PHP
BACKEND
PHP SDK - How to Use Rocketfuel with PHP SDK
This is a technical guide for developers and it requires programming experience to follow through the guide.
Prerequisite:
An approved Rocketfuel Merchant Account
Composer installed on the server
How to Install PHP SDK on your PHP app
There are two ways to install PHP SDK
a. Installation via composer
composer require rkfl/rocketfuel-php-sdk
b. Manual installation
git clone https://bitbucket.org/rocketfuelblockchain/rocketfuel-php-sdk.git
cd rocketfuel-php-sdk
composer installFor php integration without composer, follow
Usage Examples
Get UUID for triggering iFrame - (*UUID is a Unique User Identifier).
2. Verify callback from RocketFuel
3. Manually Cancel a Subscription
4. Manually Debit a Subscription
How to configure SDK
Use this code snippet for setting it up.
MERCHANT_ID,PASSWORD,EMAIL,PUBLIC_KEY are merchant details. See below to retrieve these details
PHP SDK WITHOUT COMPOSER
To integrate with PHP without composer, you will need to use this.
Step 1: Clone repo into project
Step 2: Configure the client and access its methods
Using webhook
For more information, visit webhook
FRONTEND
RKFL JS CDN and Implementation
Add the script from CDN to the Merchant site.
Once we get the response with the UUID from the backend. We will initialise an object of the above included script. We pass the following :
uuid
callback function
environment
Token
After initialising the object, start the payment by calling the initPayment method of the above script.
Callback payload
SSO Login
Create merchant Auth using the PUBLIC_KEY
RKFL Token usage
Autosignup
Existing RKFL Token
You can refer to the REFERENCE_LINK for demonstration.
How To Retrieve Merchant Details
The Email and Password refer to the email/password you use in signing into your merchant portal on https://merchant.rocketfuel.inc or equivalent.
The environment refers to the type of details you are using. You should choose production for real transactions and select sandbox when you are testing.
To retrieve Public Key, visit https://Merchant.rocketfuel.inc/settings and copy the string highlighted in the screenshot below.

You can also retrieve Merchant Id from the same page. Simply scroll up on the settings page and copy from the section highlighted below

Last updated
Was this helpful?