pacerit / bitbaypay-api-php
This package is abandoned and no longer maintained.
No replacement package was suggested.
Implementation of BitBayPay REST API
1.0.2
2020-04-01 13:57 UTC
Requires
- php: ^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.5
- rakit/validation: ^1.2
- ramsey/uuid: ^3.9
Requires (Dev)
- phpoption/phpoption: ^1.7
- phpunit/phpunit: ^8.0
- vlucas/phpdotenv: ^4.1
This package is auto-updated.
Last update: 2023-01-15 13:20:35 UTC
README
Implementation of BitBayPay REST API - https://docs.bitbaypay.com/v1.0.0-en/reference
Requirements
- PHP - ^7.2
Installation
You can install this package by composer:
composer require pacerit/bitbaypay-api-php
Usage
Example call of "payments" API method:
$client = new BitBayPay(); $parameters = [ BitBayPayInterface::PARAMETER_DESTINATION_CURRENCY => 'PLN', BitBayPayInterface::PARAMETER_PRICE => '1000', BitBayPayInterface::PARAMETER_ORDER_ID => 'randomstring', // This parameters below, are not required. // BitBayPayInterface::PARAMETER_SOURCE_CURRENCY => '', // BitBayPayInterface::PARAMETER_COVERED_BY => '', // BitBayPayInterface::PARAMETER_KEEP_SOURCE_CURRENCY => '', // BitBayPayInterface::PARAMETER_SUCCESS_CALLBACK_URL => '', // BitBayPayInterface::PARAMETER_FAILURE_CALLBACK_URL => '', // BitBayPayInterface::PARAMETER_NOTIFICATIONS_URL => '', ]; $response = $client->setPublicKey("YOUR_PUBLIC_KEY") ->setPrivateKey("YOUR_PRIVATE_KEY") ->createPayment($parameters);
Example response:
[ "paymentId" => "8418c539-f271-4287-b252-d3e3ee12f455", "url" => "https://checkout.bitbay.net/payment/8418c539-f271-4287-b252-d3e3ee12f455" ]
Available functions
- Start payment - https://api.bitbaypay.com/rest/bitbaypay/payments
- Get currency pairs - https://api.bitbaypay.com/rest/bitbaypay/stores/markets
- Get currency settings - https://api.bitbaypay.com/rest/bitbaypay/stores/currenciesSettings
- Payments list - https://api.bitbaypay.com/rest/bitbaypay/payments/search
- Payment details - https://api.bitbaypay.com/rest/bitbaypay/payments/{paymentId}
Changelog
Go to the Changelog for a full change history of the package.
Testing
You must provide your own credentials for testing environment:
BITBAYPAY_TEST_PUBLIC_KEY=
BITBAYPAY_TEST_PRIVATE_KEY=
Run tests:
composer test
Security Vulnerabilities
If you discover a security vulnerability within package, please send an e-mail to Wiktor Pacer via kontakt@pacerit.pl. All security vulnerabilities will be promptly addressed.
License
This package is open-source software licensed under the MIT license.