POST api/Pos/Sell/Bill/Pay/WithPrepayment/ByPwd
使用预订金支付一个自营零售的单据。 返回为0表示成功,返回为1表示以前支付过,本次并未支付,返回了单据的当前信息。返回-1表示失败。 被支付的单据必须是你本人的。 取件码会在本操作中返回。 本操作成功后可能有回调。 也可以在回调中查询取件码。 操作的流程是: (1)AddOrUpdate(下单) (2)PayBill(支付)。
Request Information
URI Parameters
None.
Body Parameters
PosPayWithPrepaymentByThirdPartyParm| Name | Description | Type | Additional information |
|---|---|---|---|
| BillNum |
我方系统订单单据号。不能与SenderBillNum同时为空。 |
string |
Max length: 20 |
| SenderBillNum |
第三方系统订单单据号,不能与BillNum同时为空。 |
string |
Max length: 32 |
| PayPwd |
支付密码的密文。 按以下规则进行加密: Byte[] KEY=SHA256(System.Utf8.GetBytes(会话密钥(STRING)+UPPER_MD5(登陆密码))) byte[] KEY2 = KEY的前24字节 值= ToBase64String(TripleDes(UTF8.GetBytes(UPPER_MD5(支付密码)),KEY2) 对UPPER_MD5()计算过程的描述: byte[] valueBuffer = Utf8.GetBytes(待运算的字符串) byte[] md5buffer = Md5(valueBuffer); string value = FormatString(md5Buffer,"x2)/*这个的意思是转换成bcd字符串,一个字节变成两个字符0xae= "ae",0x0a="0a"*/ string returnvalue = upper(value);全部转换成大写,仍然是每两个字符表示一个字节。 请不要指责这个脱库子放屁的处理,因为我们要兼容老版本,新版本只能如此。 |
string |
None. |
Request Formats
application/json, text/json
{
"BillNum": "sample string 1",
"SenderBillNum": "sample string 2",
"PayPwd": "sample string 3"
}
application/xml, text/xml
<PosPayWithPrepaymentByThirdPartyParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <BillNum>sample string 1</BillNum> <PayPwd>sample string 3</PayPwd> <SenderBillNum>sample string 2</SenderBillNum> </PosPayWithPrepaymentByThirdPartyParm>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
使用预订金支付一个自营零售的单据。 返回为0表示成功,返回为1表示以前支付过,本次并未支付,返回了单据的当前信息。返回-1表示失败。 被支付的单据必须是你本人的。 取件码会在本操作中返回。 本操作成功后可能有回调。 也可以在回调中查询取件码。 操作的流程是: (1)AddOrUpdate(下单) (2)PayBill(支付)。
CommonOperationResultWithTagOfPosPayWithPrepaymentResult| Name | Description | Type | Additional information |
|---|---|---|---|
| errcode | integer |
None. |
|
| errmsg | string |
None. |
|
| tag | PosPayWithPrepaymentResult |
None. |
Response Formats
application/json, text/json
{
"errcode": 1,
"errmsg": "sample string 2",
"tag": {
"BillNum": "sample string 1",
"BillState": "sample string 2",
"RndCode": "sample string 3"
}
}
application/xml, text/xml
<CommonOperationResultWithTagOfPosPayWithPrepaymentResultldpHZqFJ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer">
<errcode>1</errcode>
<errmsg>sample string 2</errmsg>
<tag xmlns:d2p1="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result">
<d2p1:BillNum>sample string 1</d2p1:BillNum>
<d2p1:BillState>sample string 2</d2p1:BillState>
<d2p1:RndCode>sample string 3</d2p1:RndCode>
</tag>
</CommonOperationResultWithTagOfPosPayWithPrepaymentResultldpHZqFJ>