Standard
With 7-Ecosystem Standard and Express, you can easily and safely receive online payments from your customer.
Developer Integration Guide
Follow these simple steps to integrate 7-Ecosystem Standard payment gateway into your website:
Go to Legal Entity Dashboard
Navigate to left sidebar and select 'Legal Entity' option
Click Gear Icon
Select gear icon next to 'Standard type'. Note: Admin approval required if icon is not visible
Fill Input Fields
Enter item details including name, order number, and price
Generate HTML Code
Click 'Generate' button and HTML code will be created
Copy Generated Code
Use 'Copy' button in top right corner of form
Insert HTML
Place copied code into HTML file. Displays PayNow button for customers
Create Payment Link
Save HTML file and send payment link to customer
Key Features
Multiple Currencies
Supports multiple currencies for global payment processing
Secure Gateway
Secure online payment gateway with industry-standard security
Mobile Apps
Available on Google Play, Apple App Store and Huawei AppGallery
Payer
Configure the payment method for Express integration
Overview
If payer wants to fund payments using 7-Ecosystem, set payer to 7-Ecosystem. (Other payment method ex: paypal, stripe, coin payments etc not available yet).
//Payer Object
$payer = new Payer();
$payer->setPaymentMethod('7-Ecosystem'); //preferably, your system name, example - 7-Ecosystem
Amount
Specify payment amount and currency details
Overview
Specify a payment amount and the currency.
//Amount Object
$amountIns = new Amount();
$amountIns->setTotal(20)->setCurrency('USD'); //must give a valid currency code and must exist in Legal Entity wallet list
Transaction
Create transaction resource with amount object
Overview
It's a Transaction resource where amount object has to set.
//Transaction Object
$trans = new Transaction();
$trans->setAmount($amountIns);
RedirectUrls
Configure success and cancel redirect URLs
Overview
Set the urls where buyer should redirect after transaction is completed or cancelled.
//RedirectUrls Object
$urls = new RedirectUrls();
$urls->setSuccessUrl('http://your-legal-entity-domain.com/example-success.php') //success url - the Legal Entity domain page, to redirect after successful payment, see sample example-success.php file in sdk root, example - http://7suu.com/7-Ecosystem_sdk/example-success.php
->setCancelUrl('http://your-legal-entity-domain.com/'); //cancel url - the Legal Entity domain page, to redirect after cancellation of payment, example - http://7suu.com/7-Ecosystem_sdk/
Payment
Create payment with all required objects and credentials
Overview
It's a payment resource where all Payer, Amount, RedirectUrls and Credentials of Legal Entity (Client ID and Client Secret) have to set. After initialized into payment object, need to call create method. It will generate a redirect URL. Users have to redirect into this URL to complete the transaction.
//Payment Object
$payment = new Payment();
$payment->setCredentials([ //client id & client secret, see Legal Entity->setting(gear icon)
'client_id' => 'place your client id here', //must provide correct client id of an express Legal Entity
'client_secret' => 'place your client secret here' //must provide correct client secret of an express Legal Entity
])->setRedirectUrls($urls)
->setPayer($payer)
->setTransaction($trans);
try {
$payment->create(); //create payment
header("Location: ".$payment->getApprovedUrl()); //checkout url
} catch (Exception $ex) {
print $ex;
exit; }
Startup Tips
Step-by-step guide to run Express integration on your device
A few steps on how to run this code on your device:
1st: Download Package
Click download for the package
2nd: Configure SDK
Now, go to php-sdk/src/7-Ecosystem/Rest/Connection.php, then change BASE_URL value to your domain name (i.e: If the domain is - 'your-domain.com' then, define( 'BASE_URL' , 'http://your-domain.com/' ))
require 'vendor/autoload.php';
//if you want to change the namespace/path from '7-Ecosystem' - lines[1-5] -
//to your desired name, i.e. (use 7-Ecosystem\Api\Amount;
//to use MyDomain\Api\Amount;), then you must change the folders name that holds the API classes
//as well as change the property '7-Ecosystem' in (autoload->psr-0) of (php-sdk/composer.json) file to your
//desired name and run "composer dump-autoload" command from sdk root
use 7-Ecosystem\Api\Payer;
use 7-Ecosystem\Api\Amount;
use 7-Ecosystem\Api\Transaction;
use 7-Ecosystem\Api\RedirectUrls;
use 7-Ecosystem\Api\Payment;
//Payer Object
$payer = new Payer();
$payer->setPaymentMethod('7-Ecosystem'); //preferably, your system name, example - 7-Ecosystem
//Amount Object
$amountIns = new Amount();
$amountIns->setTotal(20)->setCurrency('USD'); //must give a valid currency code and must exist in Legal Entity wallet list
//Transaction Object
$trans = new Transaction();
$trans->setAmount($amountIns);
Optional Instructions
If you don't see changes after configuring and extracting SDK, go to your SDK root and run the commands below:
- Composer clear-cache
- Composer install
- Composer dump-autoload