Method | Description | |
---|---|---|
__construct ( $oDb, $oConfig, $aConfig ) | Constructor | |
checkoutFinished ( ) | ||
createInvoice ( $orderId, $price, $posData, $options = [] ) : array | Creates BitPay invoice via Bitpay::curl. | |
finalizeCheckout ( &$aData ) | ||
getCurrencyList ( ) : array | Retrieves a list of all supported currencies and returns associative array. | |
getInvoice ( $invoiceId, $apiKey = false ) : mixed | Retrieves an invoice from BitPay. $options can include 'apiKey' | |
getRate ( string $code = 'USD' ) : string | Retrieves the current rate based on $code. | |
initializeCheckout ( $iPendingId, $aCartInfo, $bRecurring = false, $iRecurringDays ) |
Method | Description | |
---|---|---|
_curl ( $url, $apiKey, $post = false ) : mixed | Handles post/get to BitPay via curl. | |
_decodeResponse ( string $response ) : array | Decodes JSON response and returns associative array. | |
_hash ( $data, $key ) : string | Generates a base64 encoded keyed hash. | |
_initializeOptions ( ) | ||
_log ( mixed $contents ) | Writes $contents to a log file specified in the bp_options file or, if missing, defaults to a standard filename of 'bplog.txt'. | |
_verifyAmount ( $aPosData, $fAmount ) | ||
_verifyNotification ( ) : mixed | Call from your notification handler to convert $_POST data to an object containing invoice data | |
_verifyPosData ( array $aPosData ) : boolean | Call from your notification handler to verify posData |
protected _decodeResponse ( string $response ) : array | ||
$response | string | |
return | array | $arrResponse |
protected _verifyNotification ( ) : mixed | ||
return | mixed | $json |
protected _verifyPosData ( array $aPosData ) : boolean | ||
$aPosData | array | |
return | boolean |
public createInvoice ( $orderId, $price, $posData, $options = [] ) : array | ||
return | array | $response |
public getCurrencyList ( ) : array | ||
return | array | $currencies |
public getInvoice ( $invoiceId, $apiKey = false ) : mixed | ||
return | mixed | $json |
public initializeCheckout ( $iPendingId, $aCartInfo, $bRecurring = false, $iRecurringDays ) |