rkfl / rocketfuel-php-sdk
PHP SDK for interacting with Rocketfuel
Installs: 5 668
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
- php-http/client-common: ^2.3
- php-http/discovery: ^1.12
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- symfony/options-resolver: ^5.2
Requires (Dev)
- laminas/laminas-diactoros: ^2.4
- php-http/curl-client: ^2.1
- php-http/mock-client: ^1.5
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2025-07-12 15:38:53 UTC
README
This is a PHP client library for accessing the Rocketfuel API.
Where possible, the services available on the client groups the API into logical chunks and correspond to the structure of the Rocketfuel API documentation at https://docs.rocketfuelblockchain.com/developer-guides/api-reference
Installation
##via composer
composer require rkfl/rocketfuel-php-sdk
##Manual install composer will install all dependencies
git clone https://bitbucket.org/rocketfuelblockchain/rocketfuel-php-sdk.git
cd rocketfuel-php-sdk
composer install
##Generate Invoice link
use Api\Client\Options; use Api\Client\Rocketfuel; require_once PATH_TO_VENDOR . '/vendor/autoload.php'; $options = new Options( [ 'environment' => 'sandbox', //or prod 'merchant_id' => 'MERCHANT_ID', 'merchant_public_key' => "PUBLIC_KEY", 'client_id'=>"CLIENT_ID", 'client_secret'=>"CLIENT_SECRET", ] ); $payload = [ 'amount' => '100', 'cart' => [ [ 'id' => '1', 'name' => 'test', 'price' => '100', 'quantity' => '1' ] ], 'currency' => 'USD', 'order' => 'TEST' ]; $sdk = new Rocketfuel($options); $serviceResult = $sdk->service()->getUUID($payload);
Verify Webhook
$serviceResult = $sdk->helpers()->verifyWebhook($postData->data);
public key should be in PEM format, copy it from your RocketFuel merchant account
Setup
- "Merchant ID" (provided in RocketFuel merchant UI for registered merchants).
- "callback URL" use your own url for callback from RocketFuel service.
- In the RocketFuel UI for registered merchants click "Edit" in the bottom left corner. A window will pop up and paste callback URL.
TODO
- Tests