微信支付统一下单

URL地址:api/App/WxPay/ToPay

请求方式:POST

传递参数

None.

传递对象

wxPayEntity (用户订单对象)
名   称描   述参数类型附加信息
openid

openid

string

None.

orderNo

订单号

string

None.

money

integer

None.

type

类型:1,支付定金,2支付尾款,3退款

string

None.

application/json, text/json

Sample:
{
  "openid": "sample string 1",
  "orderNo": "sample string 2",
  "money": 3,
  "type": "sample string 4"
}

application/xml, text/xml

Sample:
<wxPayEntity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WeChat.Api.Models">
  <money>3</money>
  <openid>sample string 1</openid>
  <orderNo>sample string 2</orderNo>
  <type>sample string 4</type>
</wxPayEntity>

application/x-www-form-urlencoded

Sample:

Sample not available.

返回对象

HttpResultMessageOfwxEntity (bool)
名   称描   述参数类型附加信息
StatusCode

HttpStatusCode

None.

Errors

Dictionary of string [key] and string [value]

None.

Msg

string

None.

message

string

None.

Result

wxEntity

None.

返回对象格式

application/json, text/json

Sample:
{
  "StatusCode": 100,
  "Errors": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Msg": "sample string 1",
  "message": "sample string 2",
  "Result": {
    "timeStamp": "sample string 1",
    "nonceStr": "sample string 2",
    "package": "sample string 3",
    "paySign": "sample string 4",
    "signType": "sample string 5",
    "prepay_id": "sample string 6",
    "nonce_str": "sample string 7",
    "state": "sample string 8",
    "msg": "sample string 9"
  }
}

application/xml, text/xml

Sample:
<HttpResultMessageOfwxEntityj2mLa_SCg xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WeChat.Api.Models">
  <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Errors>
  <Msg>sample string 1</Msg>
  <Result>
    <msg>sample string 9</msg>
    <nonceStr>sample string 2</nonceStr>
    <nonce_str>sample string 7</nonce_str>
    <package>sample string 3</package>
    <paySign>sample string 4</paySign>
    <prepay_id>sample string 6</prepay_id>
    <signType>sample string 5</signType>
    <state>sample string 8</state>
    <timeStamp>sample string 1</timeStamp>
  </Result>
  <StatusCode>Continue</StatusCode>
  <message>sample string 2</message>
</HttpResultMessageOfwxEntityj2mLa_SCg>