Place an Order
Create a pre-order transaction and make payment through the returned information.
Currently, only WeChat and Alipay are supported.
Info
{domain}/Servlet/AppTradePay.do
https:/VMP/Servlet/AppTradePay.do
Name | Type | Description | Requirement |
---|---|---|---|
user_confirm_key | String(12) | User Key, provided by eftPay | |
transaction_amount | String(8) | Amount. Requires digits, maximum decimal length is 2 | |
out_trade_no | String(28) | Merchant order number | |
payType | String(6) | Payment typeAlipay ,WeChat | |
buyerType | String(7) | Device typeios ,android ,others | |
subject | String(256) | Transaction information | |
wallet | String(20) | Wallet typeAlipay :ALIPAYHK ,ALIPAYCN WeChat :WECHATHK ,WECHATCN | |
body | String(128) | In the case of needing to describe various goods, it is recommended to accumulate the string of describing the goods | |
pay_scene | String | Payment sceneAPP | |
fee_type | String(5) | Currency type, HKD ,CNY Default: HKD Default: HKD | |
tid | String(20) | Merchant terminal number | |
notify_url | String(240) | Notification address, production environment only supports 80 and 443 ports, other ports need to apply | |
active_time | String(240) | Valid time, unit seconds. WeChat defaults to 900; Alipay defaults to 1800, and requires multiples of 60. | |
time | String | Time, format:yyyyMMddHHmmss | |
sign | String(64) | Signature |
Tips
Different payType
need to correspond to different wallet
Alipay
ALIPAYHK
(Alipay Hong Kong Wallet)ALIPAYCN
(Alipay Mainland Wallet)
WeChat
WECHATHK
(WeChat Pay Hong Kong Wallet)WECHATCN
(WeChat Pay Mainland Wallet)
Name | Type | Description | Requirement |
---|---|---|---|
return_status | String(3) | Return status code, represents . Note: This parameter cannot be used to determine the success of the transaction. Other status codes refer to Appendix 3. | |
return_char | String(100) | Return description, may vary, cannot be used as a condition for judgment. | |
time | String | Time, format: yyyyMMddHHmmss Returns when return_status >= 00 . | |
sign | String(64) | Signature Returns when return_status >= 00 . |
Name | Type | Description | Requirement |
---|---|---|---|
pay_apptrade | String | APP transaction initiation information | |
user_confirm_key | String | User Key provided by eftPay | |
out_trade_no | String(28) | Merchant order number | |
payType | String(6) | Payment type | |
buyerType | String(7) | Device type | |
wallet | String(20) | Wallet type | |
eft_trade_no | String(28) | eftPay order number | |
fee_type | String(5) | Currency | |
transaction_amount | String(8) | Transaction amount | |
tid | String(20) | Terminal ID, returned when there is a delivery with a consumption request |
Tips
pay_apptrade
is used to call the corresponding payment wallet's SDK to initiate payment.
Alipay returns the data type as String
which can be used directly, while WeChat returns in JSON
format and needs to be parsed and processed according to the app development documentation.
{
"pay_scene": "APP",
"user_confirm_key": "S0003469",
"wallet": "ALIPAYCN",
"subject": "中文测试 test",
"body": "test",
"transaction_amount": "0.77",
"sign": "43b6b40b6083cc914f62216d262bae6a4f22bc9317852420295e3b4a18f529c8",
"tid": "123456",
"fee_type": "HKD",
"payType": "Alipay",
"out_trade_no": "rrn_1686280005923",
"buyerType": "android",
"time": "20230609110645"
}
{
"user_confirm_key": "S0003469",
"wallet": "ALIPAYCN",
"pay_apptrade": "_input_charset=utf-8&body=测试¤cy=HKD&forex_biz=FP......",
"return_char": "",
"transaction_amount": "0.02",
"sign": "068235adf035e0d60ca25b5d68bcc09b26782ee2190d1ac47acca9b982e2a1bb",
"fee_type": "HKD",
"tid": "",
"eft_trade_no": "20005269520084311t5rutcv1734",
"out_trade_no": "20200120114032000838",
"payType": "Alipay",
"buyerType": "android",
"return_status": "00",
"time": "20200120114035"
}