1. Go to this page and download the library: Download soneritics/buckaroo 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/ */
php
try {
$transactionStatusResponse = new \Buckaroo\Response\TransactionStatusResponse($_POST, $secretKey);
if ($transactionStatusResponse->getStatus() === \Buckaroo\Status::SUCCESS) {
$order = $transactionStatusResponse->getInvoiceNumber();
$currency = $transactionStatusResponse->getCurrency();
$amount = $transactionStatusResponse->getAmount();
echo "The order {$order} with amount {$currency} {$amount} has been paid.";
} elseif ($transactionStatusResponse->getStatus() === \Buckaroo\Status::PENDING_PROCESSING) {
$paymentCode = $transactionStatusResponse->getPaymentCode();
echo "The order is pending. Fetch transaction details later for order with payment code {$paymentCode}.";
} else {
echo 'Order has not been paid for.';
}
} catch (\Buckaroo\Exceptions\InvalidSignatureException $e) {
echo 'Signature does not match, possible break in attempt.';
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.