Direct payments
Payment Session Example
We open a merchant account No.2222 for you, the we will provide a gateway No.2222001 and SignKey "abcdefjhigk" to you.
For example: A girl named Evatan who uses her credit card (No. 4512910687950025) to take an order that No. is 00001. The total amount is EUR 98. Then the merchant will post it to the address that you filled up on the Website. In the meantime, the electronic bill will be sent to your email (test@google.com). All the trade information will be encrypted by Sha256. At the same time, the system will send signInfo to us. Once it is done, we will return the result.
Payment Url
Authorize
The next table describes the request parameters to perform an Authorize.
| Name | Type | Max Length | Required | Description |
|---|---|---|---|---|
| Merchant Info | ||||
| merNo | String | 5 | Yes | This value is provided by FIREANTPAY and is used to authenticate a merchant. |
| gatewayNo | String | 8 | Yes | This value is provided by FIREANTPAY and is used to authenticate a merchant. |
| orderNo | String | 50 | Yes | This value is the order number or tracking code, it can contain any alphanumeric value with a maximum length of 50 chars. The value must be unique. |
| orderCurrency | String | 3 | Yes | ISO 4217 Currency code that indicates the currency of the transaction. |
| orderAmount | String | 10 | Yes | Transaction amount. The decimal separator must be a point “.” |
| shipFee | String | 10 | No | The delivery freight Only for the digital, and only two decimal places after the decimal point |
| notifyUrl | String | 500 | Yes | return the payment result to this address by server asynchronous (POST method).Please return "OK" after receiving the request. |
| brower | String | 50 | Yes | Browser type |
| returnUrl | String | 500 | Yes | Payment result will be posted to this URL provided by merchant. |
| browerLang | String | 50 | Yes | Browser language |
| timeZone | String | 50 | Yes | Time zone |
| goodsInfo | String | 5000 | No | Goods detail Information, mandatory when physical goods. Including goods name, ID, unit price, number of specific detailed in the appendix.APPENDIX: 4.1 Goods Information |
| Customer Info | ||||
| cardNo | String | 20 | Yes | Card holder account number. |
| cardExpireMonth | String | 2 | Yes | Card expiration Month. Valid values are from 1 to 12. |
| cardExpireYear | String | 4 | Yes | Card expiration Year expressed with 4 digits. i.e. 2007 |
| cardSecurityCode | String | 3 | Yes | Card validation code. Each card type has a unique name for this field. Visa (Cvv2), MasterCard (Cvc2), Amex (CID) … |
| issuingBank | String | 255 | No | Customer's credit card issuing bank. |
| firstName | String | 100 | Yes | Customer’s first name. |
| lastName | String | 50 | Yes | Customer’s last name. |
| String | 200 | Yes | Customer's email address. | |
| ip | String | 50 | Yes | Customer's IP. |
| phone | String | 50 | Yes | Customer’s billing phone. |
| country | String | 100 | Yes | Customer’s billing country. |
| state | String | 100 | No | Customer's billing state. |
| city | String | 100 | Yes | Customer’s billing city. |
| address | String | 500 | Yes | Customer’s billing address |
| zip | String | 100 | Yes | Customer’s billing zipCode |
| Encryption Info | ||||
| signInfo | String | 64 | Yes | Digital signature information. signInfo = sha256(merNo + gatewayNo + orderNo + orderCurrency + orderAmount + cardNo + cardExpireYear + cardExpireMonth + cardSecurityCode + signkey); |
| Delivery information | ||||
| shipFirstName | String | 100 | Yes | Consignee’s first name |
| shipLastName | String | 100 | Yes | Consignee’s last name |
| shipAddress | String | 100 | Yes | Consignee’s shipping address |
| shipCity | String | 100 | Yes | Consignee’s shipping city |
| shipState | String | 100 | No | Consignee’s shipping state |
| shipCountry | String | 100 | Yes | Consignee’s shipping country |
| shipZip | String | 100 | Yes | Consignee’s shipping zip |
| shipEmail | String | 100 | Yes | Consignee’s shipping email |
| shipPhone | String | 100 | Yes | Consignee’s shipping phone |
| Browser information | ||||
| os | String | 50 | Yes | Operating system, eg: Windows |
| browser | String | 50 | Yes | Brower type |
| browserLang | String | 50 | Yes | Brower Language |
| timeZone | String | 50 | Yes | Timezone |
| resolution | String | 50 | Yes | ScreenWidth x ScreenHeight |
| acceptHeader | String | 100 | Yes | Brower Acceptheader |
| javaEnabled | String | 50 | Yes | Possible Values:True/False |
| colorDepth | String | 50 | Yes | Value represents the bit depth of the color palette for displaying images |
| userAgent | String | 1000 | Yes | Customer’s browser as identified from the HTTP header data |
| isCopyCard | String | 50 | Yes | Possible Values:True/False |
| deviceNo | String | 100 | Yes | Device NO. |
| uniqueId | String | 100 | Yes | Unique id |
| interfaceMode | String | 100 | Yes | Website language, eg:ZENCART_1.3.9 or PHP |
| Other information | ||||
| remark | String | 1000 | No | order remark information |
| webSite | String | 200 | Yes | Source website(shopping website/domain) The online store that you provide us with review, if this site is not, it will not be able to trade (R0001) |
Payment Submission Example
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create
(mediaType, "merNo=80000
&gatewayNo=80000001
&orderNo=12345678
&orderCurrency=USD
&orderAmount=100.00
&goodsInfo=Smart watch#,#123#,#50.00#,#2
&cardNo=4414444444444444&
cardExpireMonth=01
&cardExpireYear=2027
&cardSecurityCode=123
&firstName=Doe
&lastName=John
&email=test@test.com
&ip=12.150.22.41
&phone=0123456
&country=US
&city=New York&address=456 7th Street
&zip=10001
&returnUrl=https://xxx.com/returnUrl&webSite=https://xxx.com
¬ifyUrl=https://xxx.com/notifyurl
&signInfo=61be55a8e2f6b4e172338b");
Request request = new Request.Builder()
.url("https://sandbox.fireantspay.com/TPInterface")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'sandbox.fireantspay.com/TPInterface',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'merNo=80000&gatewayNo=80000001
&orderNo=12345678&orderCurrency=USD&orderAmount=100.00&
goodsInfo=Smart%20watch%23%2C%23123%23%2C%2350.00%23%2C%232&
cardNo=4414444444444444&cardExpireMonth=01&cardExpireYear=2027&
cardSecurityCode=123&firstName=Doe&lastName=John&
email=test%40test.com&ip=12.150.22.41&phone=0123456&country=US&
city=New%20York&address=456%207th%20Street&zip=10001&
returnUrl=https%3A%2F%2Fxxx.com%2FreturnUrl&
webSite=https%3A%2F%2Fxxx.com&
notifyUrl=https%3A%2F%2Fxxx.com%2Fnotifyurl
&signInfo=61be55a8e2f6b4e172338b',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;var request = require('request')
var options = {
method: 'POST',
url: 'sandbox.fireantspay.com/TPInterface',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
form: {
merNo: '80000',
gatewayNo: '80000001',
orderNo: '12345678',
orderCurrency: 'USD',
orderAmount: '100.00',
goodsInfo: 'Smart watch#,#123#,#50.00#,#2',
cardNo: '4414444444444444',
cardExpireMonth: '01',
cardExpireYear: '2027',
cardSecurityCode: '123',
firstName: 'Doe',
lastName: 'John',
email: 'test@test.com',
ip: '12.150.22.41',
phone: '0123456',
country: 'US',
city: 'New York',
address: '456 7th Street',
zip: '10001',
returnUrl: 'https://xxx.com/returnUrl',
webSite: 'https://xxx.com',
notifyUrl: 'https://xxx.com/notifyurl',
signInfo: '61be55a8e2f6b4e172338b'
}
}
request(options, function (error, response) {
if (error) throw new Error(error)
console.log(response.body)
})var settings = {
url: 'https://sandbox.fireantspay.com/TPInterface',
method: 'POST',
timeout: 0,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: {
merNo: '80000',
gatewayNo: '80000001',
orderNo: '12345678',
orderCurrency: 'USD',
orderAmount: '100.00',
goodsInfo: 'Smart watch#,#123#,#50.00#,#2',
cardNo: '4414444444444444',
cardExpireMonth: '01',
cardExpireYear: '2027',
cardSecurityCode: '123',
firstName: 'Doe',
lastName: 'John',
email: 'test@test.com',
ip: '12.150.22.41',
phone: '0123456',
country: 'US',
city: 'New York',
address: '456 7th Street',
zip: '10001',
returnUrl: 'https://xxx.com/returnUrl',
webSite: 'https://xxx.com',
notifyUrl: 'https://xxx.com/notifyurl',
signInfo: '61be55a8e2f6b4e172338b'
}
}
$.ajax(settings).done(function (response) {
console.log(response)
})curl --location 'sandbox.fireantspay.com/TPInterface' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merNo=80000' \
--data-urlencode 'gatewayNo=80000001' \
--data-urlencode 'orderNo=12345678' \
--data-urlencode 'orderCurrency=USD' \
--data-urlencode 'orderAmount=100.00' \
--data-urlencode 'goodsInfo=Smart watch#,#123#,#50.00#,#2' \
--data-urlencode 'cardNo=4414444444444444' \
--data-urlencode 'cardExpireMonth=01' \
--data-urlencode 'cardExpireYear=2027' \
--data-urlencode 'cardSecurityCode=123' \
--data-urlencode 'firstName=Doe' \
--data-urlencode 'lastName=John' \
--data-urlencode 'email=test@test.com' \
--data-urlencode 'ip=12.150.22.41' \
--data-urlencode 'phone=0123456' \
--data-urlencode 'country=US' \
--data-urlencode 'city=New York' \
--data-urlencode 'address=456 7th Street' \
--data-urlencode 'zip=10001' \
--data-urlencode 'returnUrl=https://xxx.com/returnUrl' \
--data-urlencode 'webSite=https://xxx.com' \
--data-urlencode 'notifyUrl=https://xxx.com/notifyurl' \
--data-urlencode 'signInfo=61be55a8e2f6b4e172338b'Operation Responses
The next table describes the fields returned in all the responses. The data format is XML, The root node is respon.
| Name | Type | Description |
|---|---|---|
| merNo | String | This value is provided by FIREANTPAY and is used toauthenticate a merchant. |
| gatewayNo | String | This value is provided by FIREANTPAY and is used to authenticate a merchant. |
| tradeNo | String | Unique identifier allocated by FIREANTPAY. |
| orderNo | String | Customer’s order number |
| orderCurrency | String | Customer’s order currency. |
| orderAmount | String | Customer’s order amount. |
| orderStatus | String | Transaction status: -2: To be confirmed -1: Pending 0: Failure 1: Success |
| orderInfo | String | Transaction result code + the result of a transaction information |
| billAddress | String | Billing address It will be returned when payment is successful. |
| signInfo | String | Digital signature on the payment of the results of key fields. signInfo = sha256(merNo + gatewayNo + tradeNo + orderNo + orderCurrency + orderAmount + orderStatus + orderInfo + signkey); |
| remark | String | Remark' The self-defined message for merchant. It will be returned exactly as the original one. |
| redirectUrl | String | 3D authorization Url, redirect to ‘redirectUrl’ when it is not null |
