Skip to main content

SDK README

Overview

When using our payment system, simply by invoking our SDK, you can easily integrate into our system without having to write a lot of code. Each function can be accomplished with just a few lines of code for system integration and invocation. Below, I will detail how to use our SDK in the system for integration. Currently, it is the PHP language version.

Function Introduction

At present, the SDK has fully implemented payment, refund, notification, proxy payment, proxy payment inquiry, order inquiry, etc.

Use Example

I will first briefly describe the way to use it. As for the usage methods of each function, please refer to the following document for detailed information.

Download

You can first execute the following command in the project root directory to download our SDK.

composer require ladylxy/jpay-sdk

After the download is completed, you can start using the SDK.

Example

    require_once 'vendor/autoload.php';
use Jpay\PaymentSDK\JpayPaymentSDK;
$sdk = new JpayPaymentSDK(
'your_merchant_id',
'your_secret_key',
'your_payment_type', // apm,cashapp,virtual,entity
'isdebug' // true or false, define true(dev environment)
);
//Based on the data required to be inputted as per the document, this is just an example.
$paymentData = [
'pay_orderid' => 'your pay orderid',
'pay_notifyurl' => 'https://your-domain.com/notify',
'pay_callbackurl' => 'https://your-domain.com/callback',
'pay_amount' => '100.00',
'pay_currency' => 'USD',
'pay_firstname' => 'John',
'pay_lastname' => 'Doe',
'pay_email_address' => '[email protected]',
'pay_telephone' => '1234567890',
'pay_country_iso_code_2' => 'US',
'pay_productname' => 'Test Product'
];

$result = $sdk->payment($paymentData);