Developer

Provide the most professional technology docking for businessmen.

1、Summary

This document is exclusively provided for merchants who cooperate with the payment platform. The purpose is to help the technical staff of the merchant to develop related access procedures. It also provides a very basic code example to allow merchants to successfully connect to our services faster.

If you have other technical connection problems, please contact our customer service email:[email protected]

2、Terminology

Name Description
Merchant Account The unique identifier assigned to the merchant after signing the contract
Gateway number Sub-merchant under Merchant Account
Key 1 gateway number corresponds to 1 key.
Acquirer The person who owns the payment card, normally the Customer.

3、Precautions

  • Connecting to the test interface of this system, all transactions will not incur costs and cannot be transferred.
  • After the test interface is successfully connected, the merchant can transfer to the official domain name interface for normal transactions. After the official interface is connected, the transaction will start to incur fees, and money can be transferred normally.
  • Please submit fields according to the field names in the table below, and the parameter names are case sensitive.
  • The commands sent to the gateway of this system are all sent in POST mode and use UTF8 encoding format.
  • To obtain the official transaction interface address and test transaction interface address, you need to contact your technical support.

 

1、Definition

Merchants submit transaction parameters to our system through the gateway to request further processing of the transaction by the system.

2、Submit Parameters

Parameter name Types Length Required Description
Merchant Info
merNo String 5 Yes 【Merchant Number】
gatewayNo String 8 Yes 【Gateway Number】
orderNo String 50 Yes 【Order Number】
When the order number is Successful/Pending/To be confirmed,it is not allowed to send this order number again.
orderCurrency String 3 Yes 【Order currency】
Attached Table
orderAmount String 10 Yes 【Order Amount】
Only 2 decimal places after the decimal point
paymentMethod String 1 Yes 【Payment Method】
Default 1, credit card payment
isAuthor Int 1 No 【Whether to take pre-authorization】
Yes: 1, No: 0
returnUrl String 500 No 【Transaction URL】
Customer Info
cardNo String 20 Yes 【Card number】
cardExpireMonth String 2 Yes 【The month when the card expires】
The valid value ranges from 01 to 12
cardExpireYear String 4 Yes 【The year the card expires】
4 digits, such as 2022
cardSecurityCode String 3 Yes 【Verification Code】
Each card has a different name. Visa card is CVV2, MasterCard is CVV2, and American Express is CID
issuingBank String 255 Yes 【Issuing bank of the cardholder's credit card】
firstName String 50 Yes 【Cardholder’s First Name】
lastName String 50 Yes 【Cardholder’s Last Name】
ip String 50 Yes 【Cardholder’s IP】
email String 2-200 Yes 【Cardholder Email】
phone String 2-50 Yes 【Cardholder phone number】
country String 100 Yes 【Cardholder Country】
state String 100 No 【Cardholder State】
city String 50 Yes 【Cardholder City】
address String 500 Yes 【Cardholder Address】
zip String 100 Yes 【Postal Code of Cardholder】
customerID String 50 No 【Unique ID of Cardholder】
signInfo String 64 Yes 【Signature Info】
signInfo=sha256(merNo+gatewayNo+orderNo+orderCurrency
+orderAmount+customerID +firstName+lastName + cardNo
+cardExpireYear+cardExpireMonth+cardSecurityCode+email
+signkey );
Other
csid String 100 Yes 【Client ID】
remark String 1000 No 【order notes】

3、Return Parameters

Name Type Description
merNo String 【Merchant Number】
gatewayNo String 【Gateway Number】
tradeNo String 【Trading order number】
orderNo String 【Merchant Order Number】
orderCurrency String 【Order Currency】
orderAmount String 【Order Amount】
orderStatus String 【Order Status】
Return number:-2/-1/0/1
-2: To be confirmed
-1: pending
0: Fail
1: Success
orderInfo String 【Transaction Result Information】
Specific information
signInfo String 【Signature Info】
signInfo=sha256(merNo + gatewayNo + tradeNo + orderNo +
orderCurrency + orderAmount + orderStatus + orderInfo + signkey)
riskInfo String 【Risk Control Information】
remark String 【Remarks】
When sending data, what is transmitted is returned

4、Demo example

4.1 Payment Service URL

Method POST
URL https://xxx.xxx/TPInterface

4.2 PHP / Curl

    1. Get signInfo(sha256)
      //$signInfo   = hash("sha256",$merNo . $gatewayNo . $orderNo . $orderCurrency . $orderAmount . $firstName . $lastName . $cardNo . $cardExpireYear . $cardExpireMonth . $cardSecurityCode . $email . $signkey);
      
      
      echo $signInfo = hash("sha256", 'Your_merNo' . 'Your_gatewayNo' . '2021002' . 'USD' . '4.5' . 'Tom' . 'Jasper' . '4111111111111111' . '2099' . '12' . '123' . '[email protected]' . 'Your_signkey');
      
      //3d221feb7deb9089428231f4571f8536abc0d60b1e7cfd5019511a4b7177ba97
      
    2. Get csid
      <!DOCTYPE html>
      <html lang="en">
      <head>
          <meta charset="UTF-8"/>
          <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
          <title>Get csid</title>
      </head>
      <body>
      <script type="text/javascript" src="http://cm.js.dl.saferconnectdirect.com/csid.js" async="async"></script>
      <input type="hidden" name="csid" id='csid' value=''/>
      </body>
      </html>
      
    3. Request
      $data = array(
          'merNo'            => 'Your_merNo',
          'gatewayNo'        => 'Your_gatewayNo',
          'orderNo'          => '2021002',
          'orderCurrency'    => 'USD',
          'orderAmount'      => '4.5',
          'firstName'        => 'Tom',
          'lastName'         => 'Jasper',
          'cardNo'           => '4111111111111111',
          'cardExpireMonth'  => '12',
          'cardExpireYear'   => '2099',
          'cardSecurityCode' => '123',
          'issuingBank'      => 'Creditcard_Bank_Name',
          'email'            => '[email protected]',
          'ip'               => '127.0.0.1',
          'returnUrl'        => 'http://www.your-website.com/notify',
          'phone'            => '2165846716',
          'country'          => 'US',
          'state'            => 'California',
          'city'             => 'Los Angeles',
          'address'          => 'Street address',
          'zip'              => '90001',
          'signInfo'         => '3d221feb7deb9089428231f4571f8536abc0d60b1e7cfd5019511a4b7177ba97',
          'csid'             => 'csid_value',
      );
      
      
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_URL, 'https://xxx.xxx/TPInterface');
      curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
      curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
      
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
      
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
      
      $response = curl_exec($curl);
      $err = curl_error($curl);
      
      curl_close($curl);
      
      if ($err) {
          var_dump($err);
      } else {
          var_dump(simplexml_load_string($response));
      }
      
    4. Response Success status

      orderStatus:1

      <?xml version="1.0" encoding="UTF-8"?>
      <respon>
          <merNo>xxx</merNo>
          <gatewayNo>xxx</gatewayNo>
          <tradeNo>xxx</tradeNo>
          <orderNo>xxx</orderNo>
          <orderAmount>xxx</orderAmount>
          <orderCurrency>USD</orderCurrency>
          <orderStatus>1</orderStatus>
          <orderInfo>Approved</orderInfo>
          <signInfo>xxx</signInfo>
          <remark>xxx</remark>
          <riskInfo>xxx</riskInfo>
          <authTypeStatus>xxx</authTypeStatus>
          <flag>xxx</flag>
      </respon>
      
    5. Response Failure status

      orderStatus:0

      <?xml version="1.0" encoding="UTF-8"?>
      <respon>
          <merNo>xxx</merNo>
          <gatewayNo>xxx</gatewayNo>
          <tradeNo>xxx</tradeNo>
          <orderNo>xxx</orderNo>
          <orderAmount>xxx</orderAmount>
          <orderCurrency>USD</orderCurrency>
          <orderStatus>0</orderStatus>
          <orderInfo>xxx</orderInfo>
          <signInfo>xxx</signInfo>
          <remark>xxx</remark>
          <riskInfo>xxx</riskInfo>
          <authTypeStatus>xxx</authTypeStatus>
          <flag>xxx</flag>
      </respon>
      

1、Definition

1.1、Commonly known as blending, the transaction review operation is confirmed through the query interface.

1.2、When there is a [Order Drop] situation on your website (checked in the background of our merchants, it is the paid status, but it is still in the pending payment status on your website), you can use this query interface to correct the abnormal order status on the website.

1.3、When you are using a delayed channel, you can also use this function to check the final status (success or failure) of the order to be processed/to be determined.

2、Submit Parameters

Name Type Length Description
merNo String 5 【Merchant Number】
gatewayNo String 8 【Gateway Number】
orderNo String 1000 【Merchant Order Number】
The order number on the website can query up to 100 transactions. Please use "," to separate.
signInfo String 64 【Signature Info】
signInfo= sha256(merNo + gatewayNo + signkey)

3、Return Parameters

Name Type Description
merNo String 【Merchant Number】
gatewayNo String 【Gateway Number】
orderNo String 【Merchant Order Number】
tradeNo String 【Trading order number】
tradeDate String 【transaction Date】Format:yyyyMMddHHmmss
tradeAmount String 【Trade Amount】
tradeCurrency String 【Trade Currency】
sourceWebSite String 【Source WebSite】
queryResult String 【Trading Results】
Return number: -2/-1/0/1/2/3/4/5/6/7/999
-2: To be confirmed
-1: Pending
0 : Failure
1 : Success
2 : Order does not exist
3 : The Submit parameter is incomplete
4 : Too many orders have been queried, (up to 100 can only be queried)
5 :Merchant number or Gateway Number does not exist
6 :signInfo Encryption information error
7 :Your server IP is not registered
999:System abnormal

Note: We will return the corresponding data record according to the number of orderNo you submitted

4、Demo example

4.1 Transaction Search Service URL

Method POST
URL https://xxx.xxx/servlet/NormalCustomerCheck

4.2 PHP / Curl

    1. Request
      $data = array(
          'merNo'     => 'Your_merNo',
          'gatewayNo' => 'Your_gatewayNo',
          'orderNo'   => '2021002',
          'signInfo'  => hash('sha256', 'Your_merNo'.'Your_gatewayNo' .'Your_signkey'),
      );
      
      
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_URL, 'https://payment-service-url/servlet/NormalCustomerCheck');
      curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
      curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
      
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
      
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
      
      $response = curl_exec($curl);
      $err = curl_error($curl);
      
      curl_close($curl);
      
      if ($err) {
          var_dump($err);
      } else {
          echo $response;
      }
      
    2. Response Sucess status

      queryResult:1

      <?xml version="1.0" encoding="UTF-8"?>
      <response>
          <tradeinfo>
              <merNo>xxx</merNo>
              <gatewayNo>xxx</gatewayNo>
              <orderNo>2021002</orderNo>
              <tradeNo>xxx</tradeNo>
              <tradeDate>yyyy-mm-dd 11:38:14</tradeDate>
              <tradeAmount>4.5</tradeAmount>
              <tradeCurrency>USD</tradeCurrency>
              <authStatus>0</authStatus>
              <sourceWebSite>http://www.your-website.com</sourceWebSite>
              <queryResult>1</queryResult>
          </tradeinfo>
      </response>
      
    3. Response Failure status

      queryResult:1

      <?xml version="1.0" encoding="UTF-8"?>
      <response>
          <tradeinfo>
              <merNo>xxx</merNo>
              <gatewayNo>xxx</gatewayNo>
              <orderNo>2021002</orderNo>
              <tradeNo>xxx</tradeNo>
              <tradeDate>yyyy-mm-dd 11:38:14</tradeDate>
              <tradeAmount>xxx</tradeAmount>
              <tradeCurrency>xxx</tradeCurrency>
              <authStatus>0</authStatus>
              <sourceWebSite>http://www.your-website.com</sourceWebSite>
              <queryResult>0</queryResult>
          </tradeinfo>
      </response>
      

Note

Without the written permission of the payment company, any part of this document shall not be copied or transmitted for any purpose, in any form or by any means (including but not limited to mechanical or electronic). For the technology and products involved in this document, the company owns its patents (or patents pending), trademarks, copyrights, or other intellectual property rights. This document does not grant these patents, trademarks, copyrights, or other intellectual property rights unless the company’s written license agreement is obtained. Licensing of intellectual property rights.

Trade Currency

Currency name Code Currency name Code
Won KRW Russian Ruble RUB
Yeni Türk Liras TRY Convertible Marks BAM
Rand ZAR Bulgarian Lev BGN
UAE Dirham AED Croatian Kuna HRK
Mexican Peso MXN Forint HUF
Chilean Peso CLP Lithuanian Litas LTL
Belarussian Ruble BYR Latvian Lats LVL
Malaysian Ringgit MYR Leu romacircnesc RON
Denar MKD Serbian dinars RSD
Serbian Dinar CSD Brazilian Real BRL
Pakistan Rupee PKR Baht THB
Hryvnia UAH New Israeli Sheqel ILS
Iranian Rial IRR Yuan Renminbi CNY
Tanzanian Shilling TZS US Dollar USD
Armenian Dram AMD Pound Sterling GBP
Iceland Krona ISK Euro EUR
Azerbaijan Manat AZN Australian Dollar AUD
Lek ALL Canadian Dollar CAD
Taka BDT Yen JPY
Saudi Riyal SAR Singapore Dollar SGD
Lari GEL Hong Kong Dollar HKD
Zloty PLN Malaysian Ringgit MYR
New Zealand Dollar NZD Philippine Peso PHP
Norvegian Krone NOK New Taiwan Dollar TWD
Danish Krone DKK Indian Rupee INR
Swedish Krona SEK Czech Koruna CZK