basbit/b2binpay

PHP sdk for B2BinPay

1.1 2022-01-12 14:58 UTC

This package is auto-updated.

Last update: 2024-04-12 20:20:06 UTC


README

Requirements

  • B2BinPay account
  • PHP >= 7.4
  • PHP extensions enabled: cURL, JSON

Composer Installation

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"
  }
}

Local installation

composer install --no-dev
cp .env.example .env

Getting started

Create Provider instance

Use the API key and secret to access your B2BinPay account:

$provider = new B2Binpay\Provider(
    'API_KEY',
    'API_SECRET',
    'https://calback.com/callback'
);

Test Mode

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!

License

B2BinPay\API-PHP is licensed under the MIT License.