POST api/Payment/PostPayment

统一下单

Request Information

Body Parameters

PaymentModel
NameDescriptionTypeAdditional information
IP

IP

string

None.

Money

价格

decimal number

None.

DeviceId

设备Id

integer

None.

ProductId

产品id

integer

None.

Phone

string

None.

UserId

用户Id

integer

None.

PayType

1:微信 2:支付宝

integer

None.

Remarks

标记

integer

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

string

None.

Request Formats

application/json, text/json

Sample:
{
  "IP": "sample string 1",
  "Money": 2.0,
  "DeviceId": 3,
  "ProductId": 4,
  "Phone": "sample string 5",
  "UserId": 6,
  "PayType": 7,
  "Remarks": 8,
  "Token": "sample string 9",
  "Language": "sample string 10",
  "AppId": "sample string 11"
}

application/xml, text/xml

Sample:
<PaymentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 11</AppId>
  <Language>sample string 10</Language>
  <Token>sample string 9</Token>
  <DeviceId>3</DeviceId>
  <IP>sample string 1</IP>
  <Money>2</Money>
  <PayType>7</PayType>
  <Phone>sample string 5</Phone>
  <ProductId>4</ProductId>
  <Remarks>8</Remarks>
  <UserId>6</UserId>
</PaymentModel>

Response Information

Resource Description

PaymentResult
NameDescriptionTypeAdditional information
prepay_id

预支付交易会话标识

string

None.

State

状态码

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "prepay_id": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<PaymentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <prepay_id>sample string 1</prepay_id>
</PaymentResult>