1. Go to this page and download the library: Download pacerit/bitbaypay-api-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pacerit / bitbaypay-api-php example snippets
$client = new BitBayPay();
$parameters = [
BitBayPayInterface::PARAMETER_DESTINATION_CURRENCY => 'PLN',
BitBayPayInterface::PARAMETER_PRICE => '1000',
BitBayPayInterface::PARAMETER_ORDER_ID => 'randomstring',
// This parameters below, are not :PARAMETER_FAILURE_CALLBACK_URL => '',
// BitBayPayInterface::PARAMETER_NOTIFICATIONS_URL => '',
];
$response = $client->setPublicKey("YOUR_PUBLIC_KEY")
->setPrivateKey("YOUR_PRIVATE_KEY")
->createPayment($parameters);