POST api/WebInterface/OrderAndPay/ScenicSpot/WithRebate/ByPassword
对景区类供应商发起预定(不论是否分时段均使用此API)并使用支付密码+返款余额对订单执行支付。 此API相当于在同一个事务中分别调用AddOrder和UseRebateWithPasswordToPay两个接口。
Request Information
URI Parameters
None.
Body Parameters
预订及支付参数。接口方可以在parm.orderinfo.senderid中指定接口方系统中的唯一订单号,电子门票系统会判断该业务单据是否被提交过,如果提交过,此过程会返回单据的最新状态(注意,系统仅会检查parm.orderinfo.senderid是否已在系统中存在,而不会比对新传入的参数的其他内容与系统中已持有的单据是否相同)。
OrderTourTicketAndPayWithPrepaymentByPwdParmName | Description | Type | Additional information |
---|---|---|---|
dwid |
客户ID |
string |
Required Max length: 36 |
dwlx |
客户类型,可以是以下取值:1-地接社,2-组团社,3-协议单位,4-地接社部门,5-组团社部门,6-协议单位部门,7-导游员。 |
string |
Required Max length: 1 |
orderinfo |
预订信息 |
OrderAddParm |
Required |
paypassword |
支付密码,非明文。 按以下规则进行加密: 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 |
Required |
sellstationid |
售票站点ID |
string |
Required Max length: 2 |
marketareaid |
市场区划ID |
string |
Max length: 8 |
teamtypecode |
团队类型代码 |
string |
Max length: 2 |
settotommrowtime |
设置订单转日时间。 |
string |
Max length: 5 |
Request Formats
application/json, text/json
{ "dwid": "sample string 1", "dwlx": "sample string 2", "orderinfo": { "orderdetails": [ { "productid": "sample string 1", "amount": 2, "identificationnumber": "sample string 3", "fullname": "sample string 4", "identificationtype": "sample string 5", "mobile": "sample string 6", "gateinmode": "sample string 7", "seatitems": [ { "seatid": "sample string 1" }, { "seatid": "sample string 1" } ] }, { "productid": "sample string 1", "amount": 2, "identificationnumber": "sample string 3", "fullname": "sample string 4", "identificationtype": "sample string 5", "mobile": "sample string 6", "gateinmode": "sample string 7", "seatitems": [ { "seatid": "sample string 1" }, { "seatid": "sample string 1" } ] } ], "mobile": "sample string 1", "otheruserid": 2, "identificationnumber": "sample string 3", "effectdate": "sample string 4", "needinvoice": "sample string 5", "invoicetitle": "sample string 6", "invoicecode": "sample string 7", "senderid": "sample string 8", "servicecode": "sample string 9", "timespanindex": 10, "tripbillcode": "sample string 11", "guidernumber": "sample string 12", "marketareaid": "sample string 13", "reserve1": "sample string 14", "reserve2": "sample string 15" }, "paypassword": "sample string 3", "sellstationid": "sample string 4", "marketareaid": "sample string 5", "teamtypecode": "sample string 6", "settotommrowtime": "sample string 7" }
application/xml, text/xml
<OrderTourTicketAndPayWithPrepaymentByPwdParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <dwid>sample string 1</dwid> <dwlx>sample string 2</dwlx> <marketareaid>sample string 5</marketareaid> <orderinfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm.WebInterface"> <d2p1:effectdate>sample string 4</d2p1:effectdate> <d2p1:guidernumber>sample string 12</d2p1:guidernumber> <d2p1:identificationnumber>sample string 3</d2p1:identificationnumber> <d2p1:invoicecode>sample string 7</d2p1:invoicecode> <d2p1:invoicetitle>sample string 6</d2p1:invoicetitle> <d2p1:marketareaid>sample string 13</d2p1:marketareaid> <d2p1:mobile>sample string 1</d2p1:mobile> <d2p1:needinvoice>sample string 5</d2p1:needinvoice> <d2p1:orderdetails> <d2p1:OrderAddItemParm> <d2p1:amount>2</d2p1:amount> <d2p1:fullname>sample string 4</d2p1:fullname> <d2p1:gateinmode>sample string 7</d2p1:gateinmode> <d2p1:identificationnumber>sample string 3</d2p1:identificationnumber> <d2p1:identificationtype>sample string 5</d2p1:identificationtype> <d2p1:mobile>sample string 6</d2p1:mobile> <d2p1:productid>sample string 1</d2p1:productid> <d2p1:seatitems> <d2p1:Order2SeatItem> <d2p1:seatid>sample string 1</d2p1:seatid> </d2p1:Order2SeatItem> <d2p1:Order2SeatItem> <d2p1:seatid>sample string 1</d2p1:seatid> </d2p1:Order2SeatItem> </d2p1:seatitems> </d2p1:OrderAddItemParm> <d2p1:OrderAddItemParm> <d2p1:amount>2</d2p1:amount> <d2p1:fullname>sample string 4</d2p1:fullname> <d2p1:gateinmode>sample string 7</d2p1:gateinmode> <d2p1:identificationnumber>sample string 3</d2p1:identificationnumber> <d2p1:identificationtype>sample string 5</d2p1:identificationtype> <d2p1:mobile>sample string 6</d2p1:mobile> <d2p1:productid>sample string 1</d2p1:productid> <d2p1:seatitems> <d2p1:Order2SeatItem> <d2p1:seatid>sample string 1</d2p1:seatid> </d2p1:Order2SeatItem> <d2p1:Order2SeatItem> <d2p1:seatid>sample string 1</d2p1:seatid> </d2p1:Order2SeatItem> </d2p1:seatitems> </d2p1:OrderAddItemParm> </d2p1:orderdetails> <d2p1:otheruserid>2</d2p1:otheruserid> <d2p1:reserve1>sample string 14</d2p1:reserve1> <d2p1:reserve2>sample string 15</d2p1:reserve2> <d2p1:senderid>sample string 8</d2p1:senderid> <d2p1:servicecode>sample string 9</d2p1:servicecode> <d2p1:timespanindex>10</d2p1:timespanindex> <d2p1:tripbillcode>sample string 11</d2p1:tripbillcode> </orderinfo> <paypassword>sample string 3</paypassword> <sellstationid>sample string 4</sellstationid> <settotommrowtime>sample string 7</settotommrowtime> <teamtypecode>sample string 6</teamtypecode> </OrderTourTicketAndPayWithPrepaymentByPwdParm>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
对景区类供应商发起预定(不论是否分时段均使用此API)并使用支付密码+返款余额对订单执行支付。 此API相当于在同一个事务中分别调用AddOrder和UseRebateWithPasswordToPay两个接口。
OrderOperatorResultName | Description | Type | Additional information |
---|---|---|---|
orderid |
操作对应(或产生)的电子门票系统订单号。 |
string |
None. |
sendid |
操作对应的第三方系统的订单号(如同程网发送过来的订单的编号),此编号由接口方提供,在提口方系统中应为唯一值。 |
string |
None. |
orderstatus |
订单当前所处的状态 |
string |
None. |
resultcode |
操作返回代码,0表示成功,其他值表示错误。 |
integer |
None. |
returnmessgage |
从接口返回的提示消息,用于告知成功的结果或出错的原因。 |
string |
None. |
Response Formats
application/json, text/json
{ "orderid": "sample string 1", "sendid": "sample string 2", "orderstatus": "sample string 3", "resultcode": 4, "returnmessgage": "sample string 5" }
application/xml, text/xml
<OrderOperatorResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result.WebInterface"> <orderid>sample string 1</orderid> <orderstatus>sample string 3</orderstatus> <resultcode>4</resultcode> <returnmessgage>sample string 5</returnmessgage> <sendid>sample string 2</sendid> </OrderOperatorResult>
application/bson
Binary JSON content. See http://bsonspec.org for details.