Definition at line 21 of file ChPmtBitPay.php.
◆ __construct()
ChPmtBitPay::__construct |
( |
|
$oDb, |
|
|
|
$oConfig, |
|
|
|
$aConfig |
|
) |
| |
◆ _curl()
ChPmtBitPay::_curl |
( |
|
$url, |
|
|
|
$apiKey, |
|
|
|
$post = false |
|
) |
| |
|
protected |
Handles post/get to BitPay via curl.
- Parameters
-
stringstringboolean | $url,$apiKey,$post | |
- Returns
- mixed $response
- Exceptions
-
Definition at line 478 of file ChPmtBitPay.php.
◆ _decodeResponse()
ChPmtBitPay::_decodeResponse |
( |
|
$response | ) |
|
|
protected |
Decodes JSON response and returns associative array.
- Parameters
-
- Returns
- array $arrResponse
- Exceptions
-
Definition at line 432 of file ChPmtBitPay.php.
◆ _hash()
ChPmtBitPay::_hash |
( |
|
$data, |
|
|
|
$key |
|
) |
| |
|
protected |
Generates a base64 encoded keyed hash.
- Parameters
-
- Returns
- string $hmac
- Exceptions
-
Definition at line 456 of file ChPmtBitPay.php.
◆ _initializeOptions()
ChPmtBitPay::_initializeOptions |
( |
| ) |
|
|
protected |
◆ _log()
ChPmtBitPay::_log |
( |
|
$contents | ) |
|
|
protected |
Writes $contents to a log file specified in the bp_options file or, if missing, defaults to a standard filename of 'bplog.txt'.
- Parameters
-
- Returns
- Exceptions
-
Definition at line 563 of file ChPmtBitPay.php.
◆ _verifyAmount()
ChPmtBitPay::_verifyAmount |
( |
|
$aPosData, |
|
|
|
$fAmount |
|
) |
| |
|
protected |
◆ _verifyNotification()
ChPmtBitPay::_verifyNotification |
( |
| ) |
|
|
protected |
Call from your notification handler to convert $_POST data to an object containing invoice data
- Parameters
-
- Returns
- mixed $json
- Exceptions
-
Definition at line 348 of file ChPmtBitPay.php.
◆ _verifyPosData()
ChPmtBitPay::_verifyPosData |
( |
|
$aPosData | ) |
|
|
protected |
Call from your notification handler to verify posData
- Parameters
-
- Returns
- boolean
Definition at line 394 of file ChPmtBitPay.php.
◆ checkoutFinished()
ChPmtBitPay::checkoutFinished |
( |
| ) |
|
◆ createInvoice()
ChPmtBitPay::createInvoice |
( |
|
$orderId, |
|
|
|
$price, |
|
|
|
$posData, |
|
|
|
$options = array() |
|
) |
| |
Creates BitPay invoice via Bitpay::curl.
- Parameters
-
stringstringstringarray | $orderId,$price,$posData,$options | |
- Returns
- array $response
- Exceptions
-
Definition at line 134 of file ChPmtBitPay.php.
◆ finalizeCheckout()
ChPmtBitPay::finalizeCheckout |
( |
& |
$aData | ) |
|
◆ getCurrencyList()
ChPmtBitPay::getCurrencyList |
( |
| ) |
|
Retrieves a list of all supported currencies and returns associative array.
- Parameters
-
- Returns
- array $currencies
- Exceptions
-
Definition at line 241 of file ChPmtBitPay.php.
◆ getInvoice()
ChPmtBitPay::getInvoice |
( |
|
$invoiceId, |
|
|
|
$apiKey = false |
|
) |
| |
Retrieves an invoice from BitPay. $options can include 'apiKey'
- Parameters
-
stringboolean | $invoiceId,$apiKey | |
- Returns
- mixed $json
- Exceptions
-
Definition at line 208 of file ChPmtBitPay.php.
◆ getRate()
ChPmtBitPay::getRate |
( |
|
$code = 'USD' | ) |
|
Retrieves the current rate based on $code. The default code us USD, so calling the function without a parameter will return the current BTC/USD price.
- Parameters
-
- Returns
- string $rate
- Exceptions
-
Definition at line 273 of file ChPmtBitPay.php.
◆ initializeCheckout()
ChPmtBitPay::initializeCheckout |
( |
|
$iPendingId, |
|
|
|
$aCartInfo, |
|
|
|
$bRecurring = false , |
|
|
|
$iRecurringDays = 0 |
|
) |
| |
The documentation for this class was generated from the following file: