- B2BinPay account
- PHP >= 7.4
- PHP extensions enabled: cURL, JSON
The easiest way to install the B2BinPay API client is to require it with Composer through command-line:
composer require basbit/b2binpay
or by editing composer.json
:
{
"require": {
"basbit/b2binpay": "^1"
}
}
composer install --no-dev
cp .env.example .env
Use the API key and secret to access your B2BinPay account:
$provider = new B2Binpay\Provider(
'API_KEY',
'API_SECRET',
'https://calback.com/callback'
);
In order to use testing sandbox, pass true
as a third parameter for B2Binpay\Provider
:
$provider = new B2Binpay\Provider(
'API_KEY',
'API_SECRET',
'https://calback.com/callback',
true
);
Warning: Sandbox and main gateway have their own pairs of key and secret!
B2BinPay\API-PHP is licensed under the MIT License.