调试资源
示例消息
1. 提交交易
请求
{
"app_id": "your app id",
"biz_data": {
"confirm_on_terminal": true,
"expires": 0,
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_type": "1"
},
"request_id": "111111",
"topic": "ecrhub.pay.order",
"timestamp": "1698302992263"
}
响应
{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_status": "2",
"price_currency": "USD",
"trans_no": "5021000010210602000003",
"pay_scenario": "SWIPE_CARD",
"trans_type": "1"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.order"
}
2. 查询交易
请求
{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"request_id": "111111",
"topic": "ecrhub.pay.query",
"timestamp": "1698302992264"
}
响应
{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257",
"order_amount": "10",
"trans_status": "2",
"price_currency": "USD",
"trans_no": "5021000010210602000003",
"pay_scenario": "SWIPE_CARD",
"trans_type": "1"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.query"
}
3. 关闭交易
请求
{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"request_id": "111111",
"topic": "ecrhub.pay.close",
"timestamp": "1698302992265"
}
响应
{
"app_id": "your app id",
"biz_data": {
"merchant_order_no": "12320231220110257"
},
"response_code": "000",
"response_msg": "",
"request_id": "111111",
"topic": "ecrhub.pay.close"
}
调试工具
- 您可以安装插件PIE SOCKET WebSocket Tester在Chorme浏览器中,使用此插件,您可以模拟将数据发送到Codepay Register。
- 输入从CodePay Register获得的ip地址,然后单击CONNECT。
- 连接成功后,输入事务消息,然后单击发送消息。