soneritics / buckaroojson
Buckaroo PHP implementation
Installs: 13 064
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
Requires (Dev)
README
Buckaroo
Buckaroo payment provider implementation classes Connect with Buckaroo through their easy to use JSON API.
Important!
If you have the problem where floats are serialized the wrong way, add this line to your code:
ini_set( 'serialize_precision', -1 );
you have this problem when you get the error: An error occurred while processing the transaction: Total amount of articles does not match the transaction amount (S996)
Payment methods
Currently, the following payment methods are supported
- iDeal
- AfterPay (DigiAccept)
- Bancontact
- KBC
- Credit cards:
- Mastercard
- Visa
- American Express
- Debit cards:
- VPay
- Maestro
- Visa Electron
- Carte Bleue
- Carte Bancaire
- Dankort
Example
Some example code has been added in the Examples folder. A sneak peek below :-)
$transactionKey = ''; // Your transaction key here $authentication = new Authentication($secretKey, $websiteKey); $buckaroo = new Buckaroo($authentication, true); $transactionStatusRequest = $buckaroo->getTransactionStatusRequest($transactionKey)->request(); if ($transactionStatusRequest['Status']['Code']['Code'] == PaymentStatus::SUCCESS) { // Order is paid }
Multiple payment methods
When you want the customer to make a choice for the payment method, but you do not want it on your own site, that's also possible. You can use the MultiServiceTransactionRequest for that. This is something that's commonly used for creditcard transactions.
$ccTransactionRequest = $buckaroo->getMultiServiceTransactionRequest() ->addService(new CreditcardMastercard) ->addService(new CreditcardVisa) ->addService(new CreditcardAmericanExpress) ->setAmountDebit(12.5) ->setInvoice('inv-123') ->request(); // Redirect the user to: echo $ccTransactionRequest['RequiredAction']['RedirectURL']