Authored by chenjian

Apple pay预支付接口

## 1、获取用户的订单总数 ##
获取用户的订单总数(web.SpaceOrders.getOrderCountByUid)(PC接口)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
... ... @@ -7,148 +7,148 @@
|uid|int|否|3236556|0|用户id|
#### 请求示例
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=ce8e341b7ff407f2bac61915b54e5dde&client_type=web&id=4&method=web.SpaceOrders.getOrderCountByUid&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&uid=3236556&v=7
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=ce8e341b7ff407f2bac61915b54e5dde&client_type=web&id=4&method=web.SpaceOrders.getOrderCountByUid&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&uid=3236556&v=7
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":{"count":5},
"md5":"c1d725306fb09dcbf504776d276521cb",
"message":"ok"
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":{"count":5},
"md5":"c1d725306fb09dcbf504776d276521cb",
"message":"ok"
}
```
## 2、更新订单的状态
更新订单的状态 (web.SpaceOrders.updatePaymentStatus) (PC接口)
```
## 2、更新订单的状态
更新订单的状态 (web.SpaceOrders.updatePaymentStatus) (PC接口)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|id|int|否||0|订单id|
|uid|int|否||0|用户id|
|payment|byte|否|0|支付方式|
|payment_status|string|否||支付状态|
|bank_code|string|否||银行代码|
|id|int|否||0|订单id|
|uid|int|否||0|用户id|
|payment|byte|否|0|支付方式|
|payment_status|string|否||支付状态|
|bank_code|string|否||银行代码|
请求示例
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&bank_code=1&client_secret=13edd7a6bac44bb87cee105a814e930f&client_type=web&id=990&method=web.SpaceOrders.updatePaymentStatus&os_version=9.1&payment=28&payment_status=Y&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&uid=58023&v=7
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&bank_code=1&client_secret=13edd7a6bac44bb87cee105a814e930f&client_type=web&id=990&method=web.SpaceOrders.updatePaymentStatus&os_version=9.1&payment=28&payment_status=Y&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&uid=58023&v=7
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[],
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[],
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
}
```
## 3、通过PaymentID 获取支付途径(配置信息)
通过PaymentID 获取支付途径(配置信息) (web.SpaceOrders.getPaymentById) (PC接口)
```
## 3、通过PaymentID 获取支付途径(配置信息)
通过PaymentID 获取支付途径(配置信息) (web.SpaceOrders.getPaymentById) (PC接口)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|id|int|否||0|支付方式id|
|id|int|否||0|支付方式id|
请求示例
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=0b73fa97ffb88c544de8f41affd10df8&client_type=web&id=4&method=web.SpaceOrders.getPaymentById&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&v=7
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=0b73fa97ffb88c544de8f41affd10df8&client_type=web&id=4&method=web.SpaceOrders.getPaymentById&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&v=7
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":{
"id":4,
"payCode":"Chinabank",
"payFee":"0",
"payIcon":"http://static.yohobuy.com/images/pay/icon/wangyinzaixian.png",
"payIntro":"网银在线",
"payName":"网银在线",
"payOrder":70,
"payParams":"{\"merchant_id\":\"22439234\",\"merchant_key\":\"eafa1d23099f8ba5\"}","paymentId":1,"status":"Y"
},
"md5":"08e4bd7712d3b33c188854d4f617e8a2",
"message":"ok"
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":{
"id":4,
"payCode":"Chinabank",
"payFee":"0",
"payIcon":"http://static.yohobuy.com/images/pay/icon/wangyinzaixian.png",
"payIntro":"网银在线",
"payName":"网银在线",
"payOrder":70,
"payParams":"{\"merchant_id\":\"22439234\",\"merchant_key\":\"eafa1d23099f8ba5\"}","paymentId":1,"status":"Y"
},
"md5":"08e4bd7712d3b33c188854d4f617e8a2",
"message":"ok"
}
```
## 4、获取所有支付途径
获取所有支付途径 (web.SpaceOrders.getPaymentList) (PC接口)
```
## 4、获取所有支付途径
获取所有支付途径 (web.SpaceOrders.getPaymentList) (PC接口)
#### 请求参数
请求示例
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=8456afe5f855027a0a7506a6c378b04f&client_type=web&method=web.SpaceOrders.getPaymentList&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&v=7
http://devapi.yoho.cn:58078/?app_version=4.1.0.1603140001&client_secret=8456afe5f855027a0a7506a6c378b04f&client_type=web&method=web.SpaceOrders.getPaymentList&os_version=9.1&private_key=0ed29744ed318fd28d2c07985d3ba633&screen_size=375x667&v=7
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[{"id":2,"payCode":"Alipay","payFee":"0","payIcon":"http://static.yohobuy.com/images/pay/icon/zhifubao.png","payIntro":"支付宝","payName":"支付宝","payOrder":100,"payParams":"{\"merchant_id\":\"2088701661478015\",\"merchant_key\":\"kcxawi9bb07mzh0aq2wcirsf9znusobw\",\"merchant_other_code\":\"zfb@yoho.cn\"}","paymentId":1,"status":"Y"}],
"md5":"6ab18beb8641da17abe8c08e01f1c246",
"message":"ok"
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[{"id":2,"payCode":"Alipay","payFee":"0","payIcon":"http://static.yohobuy.com/images/pay/icon/zhifubao.png","payIntro":"支付宝","payName":"支付宝","payOrder":100,"payParams":"{\"merchant_id\":\"2088701661478015\",\"merchant_key\":\"kcxawi9bb07mzh0aq2wcirsf9znusobw\",\"merchant_other_code\":\"zfb@yoho.cn\"}","paymentId":1,"status":"Y"}],
"md5":"6ab18beb8641da17abe8c08e01f1c246",
"message":"ok"
}
```
## 5、ERP提交订单状态
ERP提交订单状态 (web.SpaceOrders.submitOrderStatus) (PC接口)
```
## 5、ERP提交订单状态
ERP提交订单状态 (web.SpaceOrders.submitOrderStatus) (PC接口)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|order_code|string|否|||订单号|
|payment|byte|否|||支付方式|
|bank_name|string|否|||银行名称|
|bank_code|string|否|||银行代码|
|amount|double|否|||金额|
|payOrderCode|string|否|||订单号|
|trade\_no|string|否|||交易流水号|
|bank\_bill_no|string|否|||银行流水号|
|order_code|string|否|||订单号|
|payment|byte|否|||支付方式|
|bank_name|string|否|||银行名称|
|bank_code|string|否|||银行代码|
|amount|double|否|||金额|
|payOrderCode|string|否|||订单号|
|trade\_no|string|否|||交易流水号|
|bank\_bill_no|string|否|||银行流水号|
请求示例
http://devapi.yoho.cn:58078/\?amount\=10.00\&app_version\=4.1.0.1603140001\&bank_bill_no\=9287358013\&bank_code\=1\&bank_name\=icbc\&client_secret\=0a891962abf87eff2b3953764e2e36f5\&client_type\=web\&method\=web.SpaceOrders.submitOrderStatus\&order_code\=798234910\&os_version\=9.1\&payOrderCode\=798234910\&payment\=18\&private_key\=0ed29744ed318fd28d2c07985d3ba633\&screen_size\=375x667\&trade_no\=86934052025984506308\&v\=7
http://devapi.yoho.cn:58078/\?amount\=10.00\&app_version\=4.1.0.1603140001\&bank_bill_no\=9287358013\&bank_code\=1\&bank_name\=icbc\&client_secret\=0a891962abf87eff2b3953764e2e36f5\&client_type\=web\&method\=web.SpaceOrders.submitOrderStatus\&order_code\=798234910\&os_version\=9.1\&payOrderCode\=798234910\&payment\=18\&private_key\=0ed29744ed318fd28d2c07985d3ba633\&screen_size\=375x667\&trade_no\=86934052025984506308\&v\=7
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[],
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
响应JSON格式如下所示:
```json
{
"alg":"SALT_MD5",
"code":200,
"data":[],
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
}
```
... ... @@ -229,4 +229,27 @@ code为200即为成功,否则是失败。
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
}
```
\ No newline at end of file
```
##9、Apple Pay预支付接口
Apple Pay预支付接口(/payment/applepay_data)(APP接口,Get方法)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|order_code|string|否|||订单号|
|payment|byte|否|||支付方式|
请求示例
http://testservice.yoho.cn:28077/payment/applepay_data?client_secret=d5488bea8adfeef9a5b14b2187d02696&order_code=160144596&payment_code=30
####响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```
{
"alg":"SALT_MD5",
"code":200,
"data":[],
"md5":"6d729d4b35f10fc73531210bd7ecff91",
"message":"ok"
}
\ No newline at end of file
... ...