- About
- Requirements
- Composer Installation
- Requirements
- Example
- Contribute
- Versioning
- Additional information
Buckaroo is the the Payment Service Provider for all your online payments with more than 15,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. Buckaroo developed their own PHP SDK. The SDK is a modern, open-source PHP library that makes it easy to integrate your PHP application with Buckaroo's services. Start accepting payments today with Buckaroo.
To use the Buckaroo API client, the following things are required:
By far the easiest way to install the Buckaroo API client is to require it with Composer.
$ composer require buckaroo/sdk:^1.0
{
"require": {
"buckaroo/sdk": "^1.0"
}
}
Create and config the Buckaroo object. You can find your credentials in plaza WEBSITE_KEY and SECRET_KEY
require __DIR__ . '/vendor/autoload.php';
# Get your website & secret key in your plaza.
# You can perform a test payment by giving the third param with the string "test", on default it is set on "live"
$buckaroo = new \BuckarooClient('WEBSITE_KEY', 'SECRET_KEY', 'test');
Create a payment with all the available payment methods. In this example, we show how to create a credit card payment. Each payment has a slightly different payload.
# Create a new payment
$buckaroo->method('creditcard') // Input the desire payment method.
->pay([
'name' => 'visa', // Request to pay with Visa
'amountDebit' => 10, // The amount we want to charge
'invoice' => 'UNIQUE-INVOICE-NO', // Each payment must contain a unique invoice number
]);
After you create a transaction, you can retrieve several transaction information on demand.
# Retrieve transaction information
$transaction = $buckaroo->transaction('YOUR-TRANSACTION-KEY')
$transaction->status(); // Retrieve transaction status
$transaction->refundInfo(); // Retrieve refund info
$transaction->cancelInfo() // Retrieve cancellation info
Find our full documentation online on docs.buckaroo.io.
We really appreciate it when developers contribute to improve the Buckaroo plugins. If you want to contribute as well, then please follow our Contribution Guidelines.
- MAJOR: Breaking changes that require additional testing/caution
- MINOR: Changes that should not have a big impact
- PATCHES: Bug and hotfixes only
- Support: https://support.buckaroo.eu/contact
- Contact: [email protected] or +31 (0)30 711 50 50
Buckaroo PHP SDK is open-sourced software licensed under the MIT license.