POST api/v1/Order/CreateWxMpPayInfo
微信统一预下单
请求信息(Request)
URI 参数
None.
Body 参数
参数
WxMpPayInfoParamDTO| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| userId |
用户id(没有就设置为0) |
integer |
None. |
| useType |
付款用途 |
PayUseType |
None. |
| outTradeId |
交易关联的id |
integer |
None. |
| openId |
微信openId |
string |
None. |
| subOpenId |
subAppId对应的subOpenId |
string |
None. |
| appId |
微信appId |
string |
None. |
| subAppId |
子商户appId |
string |
None. |
| subAppIdPay |
是否是子商户唤起支付 |
boolean |
None. |
| clientIp |
客户端ip |
string |
None. |
| hotelId |
酒店id(没有则不填写) |
integer |
None. |
请求格式
application/json, text/json
Sample:
{
"userId": 1,
"useType": 0,
"outTradeId": 2,
"openId": "sample string 3",
"subOpenId": "sample string 4",
"appId": "sample string 5",
"subAppId": "sample string 6",
"subAppIdPay": true,
"clientIp": "sample string 8",
"hotelId": 1
}
application/xml, text/xml
Sample:
<WxMpPayInfoParamDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application.DTOs.Api"> <appId>sample string 5</appId> <clientIp>sample string 8</clientIp> <hotelId>1</hotelId> <openId>sample string 3</openId> <outTradeId>2</outTradeId> <subAppId>sample string 6</subAppId> <subAppIdPay>true</subAppIdPay> <subOpenId>sample string 4</subOpenId> <useType>PmsOrder</useType> <userId>1</userId> </WxMpPayInfoParamDTO>
application/x-www-form-urlencoded
Sample:
响应信息(Response)
资源描述
RequestResultOfWeixinPayInfoDTO| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| Data | WeixinPayInfoDTO |
None. |
|
| Status |
状态(0:成功,1:失败) |
integer |
None. |
| Message |
导致失败的相关消息 |
string |
None. |
| Total |
集合总数,用于分页时使用 |
integer |
None. |
响应格式
application/json, text/json
Sample:
{
"Data": {
"AppID": "sample string 1",
"PartnerId": "sample string 2",
"PrepayId": "sample string 3",
"PackageValue": "sample string 4",
"NonceStr": "sample string 5",
"TimeStamp": "sample string 6",
"Sign": "sample string 7",
"SignType": "sample string 8",
"QrCodeUrl": "sample string 9",
"OutTrdeNo": "sample string 10"
},
"Status": 1,
"Message": "sample string 2",
"Total": 3
}
application/xml, text/xml
Sample:
<RequestResultOfWeixinPayInfoDTOFEB0ySd7 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application">
<Message>sample string 2</Message>
<Status>1</Status>
<Total>3</Total>
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/WLife.Application.WeiXin">
<d2p1:AppID>sample string 1</d2p1:AppID>
<d2p1:NonceStr>sample string 5</d2p1:NonceStr>
<d2p1:OutTrdeNo>sample string 10</d2p1:OutTrdeNo>
<d2p1:PackageValue>sample string 4</d2p1:PackageValue>
<d2p1:PartnerId>sample string 2</d2p1:PartnerId>
<d2p1:PrepayId>sample string 3</d2p1:PrepayId>
<d2p1:QrCodeUrl>sample string 9</d2p1:QrCodeUrl>
<d2p1:Sign>sample string 7</d2p1:Sign>
<d2p1:SignType>sample string 8</d2p1:SignType>
<d2p1:TimeStamp>sample string 6</d2p1:TimeStamp>
</Data>
</RequestResultOfWeixinPayInfoDTOFEB0ySd7>