|
@@ -0,0 +1,83 @@
|
|
|
|
+# 支付宝二级商户报备文档
|
|
|
|
+[上海偶可贝网络科技有限公司](https://www.allpayx.com)
|
|
|
|
+
|
|
|
|
+* 版本信息:中文 V1.0.0
|
|
|
|
+* 更新时间:2018 年11 月
|
|
|
|
+
|
|
|
|
+#### 1.概述
|
|
|
|
+
|
|
|
|
+ 支付宝新增二级商户报备接口,支付宝会将交易接口中上送的2级商户信息与报备的商户信息做校验。
|
|
|
|
+
|
|
|
|
+#### 2.通用API说明
|
|
|
|
+ 该接口提供支付宝二级商户报备功能
|
|
|
|
+
|
|
|
|
+##### 2.1. 验签说明
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+1.对于发送到 ALLPAY 系统的 POST 请求报文,其中所有传入参数(除 signature 参数外)按照字段名的 ASCII 码从小到大排序后(字典序),使用 URL 键值对的格式(即 key1=value1&key2=value2...)拼接成字符串 String1。
|
|
|
|
+
|
|
|
|
+2.在 String1 最后直接拼接(不需要用“&”连接)双方约定的签名密钥 K1(接入时 ALLPAY 时分配),得到 stringSignTemp 字符串,并对 stringSignTemp 进行 md5 运算,得到 signature 的值。
|
|
|
|
+
|
|
|
|
+3.示例签名串 acqID=99020344&backURL=http://example.com/example&charSet=UTF- 8&frontURL=nil&merID=000000000000015&merReserve=nil&orderAmount=0.01&orderCurre ncy=CNY&orderNum=869873851812&paymentSchema=APMP&signType=MD5&transTime= 20151112151356&transType=PURC&version=VER0000000022f2c77e3718c47cfb47a89a6fbc9d361
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+##### 2.2. API 接入地址
|
|
|
|
+
|
|
|
|
+ 交易名称 |开发调试地址|生产交易地址
|
|
|
|
+ ------- |-----------|-------
|
|
|
|
+ 支付宝二级商户报备接口 |https://testapi.allpayx.com/gw/gw/alipay/register |https://api.allpayx.com/gw/gw/alipay/register
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#### 3. API接口
|
|
|
|
+
|
|
|
|
+##### 3.1. 二级商户报备接口
|
|
|
|
+
|
|
|
|
+1. 接口说明
|
|
|
|
+
|
|
|
|
+ 该接口为接入商家提供交易查询的功能。
|
|
|
|
+
|
|
|
|
+2. 请求报文格式
|
|
|
|
+
|
|
|
|
+| 参数 | 类型 | 属性 | 描述 |
|
|
|
|
+| ------------- | ------------ | ---- | ------------------------------------------------------------ |
|
|
|
|
+| merID | String(15) | M | 商户 ID,由AllPay 分配 |
|
|
|
|
+| paymentSchema | String(10) | M | 渠道代码:AP , APMP |
|
|
|
|
+| site_infos | String(1000) | M | This field is in JSON format and can contain up to 5 website URLs or app download URLs. See [site_infos](https://global.alipay.com/service/website_split/37#siteinfos) for details . URLs in this field cannot be updated incrementally. To add or remove URLs, re-pass the value again。Format: [{"site_type":"WEB","site_url":"https://alipay.com","site_name":"websit"},{"site_type":"APP","site_url":"https://alipay.com","site_name":"websit"}] |
|
|
|
|
+| transTime | String(14) | M | 交易时间,格式:"yyyyMMddHHmmss" |
|
|
|
|
+| signType | String(3) | M | MD5 |
|
|
|
|
+| signature | String(32) | M | 采用 MD5 签名 |
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+Sub-parameter: site_infos
|
|
|
|
+
|
|
|
|
+| 参数 | 类型 | 属性 | 描述 |
|
|
|
|
+| --------- | ----------- | ---- | ------------------------------------------------------------ |
|
|
|
|
+| site_type | String(20) | N | Site type. Website URL must be 'WEB', and app download URL must be 'APP'. Use uppercase. |
|
|
|
|
+| site_url | String(256) | N | When site_type is WEB, pass the URL in this format: http/https + SLD + TLD, for example,https://www.alipay.com。When site_type is APP, pass the APP download URL starting with http/https, for example, <https://itunes.apple.com/cn/app/id333206289>. |
|
|
|
|
+| site_name | String(512) | Y | Site name: xx Store |
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+3. 响应报文格式
|
|
|
|
+
|
|
|
|
+| 参数 | 类型 | 属性 | 描述 |
|
|
|
|
+| ------------- | ----------- | ---- | ------------------------------ |
|
|
|
|
+| RespCode | String(2) | M | 应答码 00-成功 |
|
|
|
|
+| RespMsg | String(200) | M | 应答消息 |
|
|
|
|
+| merID | String(15) | M | 商户 ID,由AllPay 分配 |
|
|
|
|
+| paymentSchema | String(10) | M | 渠道代码:AP , APMP |
|
|
|
|
+| transTime | String(14) | M | 交易时间,格式:"yyyyMMddHHmmss" |
|
|
|
|
+| signType | String(3) | M | MD5 |
|
|
|
|
+| signature | String(32) | M | 采用 MD5 签名 |
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#### 5.技术支持
|
|
|
|
+
|
|
|
|
+如果您在调试时遇到问题,请我们联系:support@allpayx.com。
|
|
|
|
+
|
|
|
|
+
|