更新订单
商户如需在SDK提交支付之前更新订单信息,可以调用此接口。
注意
- 此接口需要自定义支付按钮,详情请查看自定义支付按钮
- TransactionInformation 中的字段如不更新则不传入。请勿传
null
或空字符串,会覆盖原始值。
请求参数
POST
名称 | 类型 | 长度 | 必填 | 描述 |
---|---|---|---|---|
merchantNo | String | 20 | Yes | 商户号。 商户注册时,OnerWay 会为商户创建商户号 |
merchantTxnId | String | 64 | No | 商户创建的商户交易订单号,不同的订单号视为不同的交易。和 transactionId 两个参数中至少传一个 |
transactionId | String | 20 | No | Onerway 创建的交易订单号,对应商户订单号。和 merchantTxnId 两个参数中至少传一个 |
orderAmount | String | 19 | Yes | 修改后的交易订单金额。 |
billingInformation | String | / | No | 交易账单信息。 格式为 json 字符串。 请参阅对象 TransactionInformation |
shippingInformation | String | / | No | 交易邮寄信息。 格式为 json 字符串。 请参阅对象 TransactionInformation |
sign | String | / | Yes | 签名字符串,请参阅签名接口 |
TransactionInformation
名称 | 类型 | 长度 | 必填 | 描述 |
---|---|---|---|---|
firstName | String | 64 | Yes | 名 (虚拟商品可不传) |
lastName | String | 64 | Yes | 姓 (虚拟商品可不传) |
jpFirstName | String | 64 | No | (日文片假名)名 |
jpLastName | String | 64 | No | (日文片假名)姓 |
phone | String | 32 | Yes | 电话号码 (虚拟商品的可不传) |
String | 256 | Yes | 电子邮件 | |
postalCode | String | 32 | Yes | 邮政编码 (虚拟商品可不传) |
address | String | 256 | Yes | 地址 (虚拟商品可不传) |
country | String | 64 | Yes | 国家。 请参阅 ISO 3166。 |
province | String | 64 | Yes | 州。 当国家是美国 (US) 或加拿大 (CA) 时必填。 请参阅 ISO 3166。 |
city | String | 64 | Yes | 城市 (虚拟商品可不传) |
street | String | 64 | No | 街道 |
number | String | 64 | No | 门牌号 |
identityNumber | String | 64 | No | 证件号码 |
birthDate | String | 64 | No | 出生日期,格式为 yyyy/MM/dd |
请求及响应示例
json
{
"billingInformation": "{\"firstName\":\"test\",\"lastName\":\"test\",\"phone\":\"18600000000\",\"email\":\"abel.wang@onerway.com\",\"postalCode\":\"430000\",\"address\":\"Unit 1113, 11/F, Tower 2, Cheung Sha Wan Plaza, 833 Cheung Sha Wan Road, Lai Chi Kok\",\"country\":\"CN\",\"province\":\"HB\",\"city\":\"HK\"}",
"merchantNo": "800209",
"merchantTxnId": "",
"orderAmount": "20",
"shippingInformation": "{\"firstName\":\"Shipping\",\"lastName\":\"Name\",\"phone\":\"188888888888\",\"email\":\"abel.wang@onerway.com\",\"postalCode\":\"888888\",\"address\":\"Shipping Address Test\",\"country\":\"CN\",\"province\":\"HB\",\"city\":\"WH\",\"street\":\"833 Cheung Sha Wan Road\",\"number\":\"1\",\"identityNumber\":\"82962612865\"}",
"sign": "d1db1166ec3db7a8b9e8e731f22b17c7e0998702690fdfa0808378f44551d239",
"transactionId": "1815676095086067712" 下单接口返回的 transactionId
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1815676095086067712", 下单接口返回的 transactionId
"responseTime": null,
"txnTime": null,
"txnTimeZone": null,
"orderAmount": null,
"orderCurrency": null,
"txnAmount": null,
"txnCurrency": null,
"status": null,
"redirectUrl": null,
"contractId": null,
"tokenId": null,
"eci": null,
"periodValue": null,
"codeForm": null,
"presentContext": null,
"actionType": null,
"sign": "d95748122b302d0944d5e48bba4092831f96bb38978007763bc4024f8142e0a7"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24