blockbee / php-blockbee-checkout
BlockBee Checkout PHP library
dev-main
2024-03-14 14:48 UTC
Requires
- php: >=5.6.0
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2025-03-18 22:57:07 UTC
README
BlockBee's Checkout PHP Library
Official PHP library of BlockBee Checkout
Deprecated! It has been integrated into php-blockbee.
Requirements:
PHP >= 5.6
ext-curl
Install
composer require blockbee/php-blockbee-checkout
Usage
To use our Checkout page, you will need to follow these steps:
- (1) Create an account on our Dashboard.
- (2) Create a "Company" within the account.
- (3) In the "Company" Settings, generate a new "API Key".
- (4) Set up the Payment Settings.
Requesting Payment
<?php require 'vendor/autoload.php'; // Where your vendor directory is $bb = new BlockBee\Checkout($api_key, $parameters, $blockbee_params); $payment_address = $bb->payment_request($redirect_url, $value);
Where:
$api_key
is the API Key provided by our Dashboard.$parameters
is any parameter you wish to send to identify the payment, such as['order_id' => 1234]
$blockbee_params
parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/payment)$redirect_url
URL in your platform, where the user will be redirected to following the payment. Should be able to process the payment using thesuccess_token
.$value
amount in currency set in Payment Settings you want to receive from the user.
Getting notified when the user completes the Payment
When receiving payments, you have the option to receive them in either the
notify_url
or theredirect_url
, but adding theredirect_url
is required (refer to our documentation at https://docs.blockbee.io/#operation/paymentipn).
Requesting Deposit
<?php require 'vendor/autoload.php'; // Where your vendor directory is $bb = new BlockBee\Checkout($api_key, $parameters, $blockbee_params); $payment_address = $bb->deposit_request($notify_url);
Where:
$api_key
is the API Key provided by our Dashboard.$parameters
is any parameter you wish to send to identify the payment, such as['order_id' => 1234]
$blockbee_params
parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/deposit)$notify_url
URL in your platform, where the IPN will be sent notifying that a deposit was done. Parameters are available here: https://docs.blockbee.io/#operation/depositipn.
Getting notified when the user makes a deposit
When receiving deposits, you must provide a
notify_url
where our system will send an IPN every time a user makes a deposit (refer to our documentation at https://docs.blockbee.io/#operation/depositipn).
Help
Need help?
Contact us @ https://blockbee.io/contacts/
Changelog
1.0.0
- Initial Release