BitPay PHP SDK

BillClient
in package

Handles interactions with the bill endpoints.

Tags
author

BitPay Integrations integrations@bitpay.com

license

http://www.opensource.org/licenses/mit-license.php MIT

Table of Contents

Properties

$instance  : self|null
$restCli  : RESTcli
$tokenCache  : Tokens

Methods

create()  : Bill
Create a BitPay Bill.
deliver()  : bool
Deliver a BitPay Bill.
get()  : Bill
Retrieve a BitPay bill by bill id using the specified facade.
getBills()  : array<string|int, Bill>
Retrieve a collection of BitPay bills.
getInstance()  : static
Factory method for Bill Client.
update()  : Bill
Update a BitPay Bill.
__construct()  : mixed
mapJsonToBillClass()  : Bill

Properties

$instance

private static self|null $instance = null

Methods

create()

Create a BitPay Bill.

public create(Bill $bill[, string $facade = Facade::MERCHANT ][, bool $signRequest = true ]) : Bill
Parameters
$bill : Bill

A Bill object with request parameters defined.

$facade : string = Facade::MERCHANT

The facade used to create it.

$signRequest : bool = true

Signed request.

Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
Bill

deliver()

Deliver a BitPay Bill.

public deliver(string $billId, string $billToken[, bool $signRequest = true ]) : bool
Parameters
$billId : string

The id of the requested bill.

$billToken : string

The token of the requested bill.

$signRequest : bool = true

Allow unsigned request

Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
bool

get()

Retrieve a BitPay bill by bill id using the specified facade.

public get(mixed $billId[, mixed $facade = Facade::MERCHANT ][, mixed $signRequest = true ]) : Bill
Parameters
$billId : mixed

string The id of the bill to retrieve.

$facade : mixed = Facade::MERCHANT

string The facade used to retrieve it.

$signRequest : mixed = true

bool Signed request.

Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
Bill

getBills()

Retrieve a collection of BitPay bills.

public getBills([string|null $status = null ]) : array<string|int, Bill>
Parameters
$status : string|null = null

The status to filter the bills.

Tags
throws
BitPayApiException
throws
BitPayGenericException
Return values
array<string|int, Bill>

getInstance()

Factory method for Bill Client.

public static getInstance(Tokens $tokenCache, RESTcli $restCli) : static
Parameters
$tokenCache : Tokens
$restCli : RESTcli
Return values
static

mapJsonToBillClass()

private mapJsonToBillClass(string|null $responseJson) : Bill
Parameters
$responseJson : string|null
Tags
throws
JsonException
throws
JsonMapper_Exception
Return values
Bill

        
On this page

Search results