Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program capacity party to use onCancelOrder


May 19, 2021 WeChat Mini Program Development Document



logistics.onCancelOrder

This document describes messages or events received on the server side, see Message Push for details.

Cancel the order event.

The message parameter

Object

Property Type Description
ToUserName string Express company small program UserName
FromUserName string OpenID for the next user
CreateTime number Event time, Unix timestamp
MsgType string Message type, pinned to event
Event string Event type, fixed to cancel_waybill
OrderID string The ID that uniquely identifies the order and is generated by the merchant
BizID string Merchant ID
BizPwd string Merchant password
ShopAppID string The merchant's applet appID
WayBillID string The ticket ID, generated from the microseal segment

The message returns

Property Type The default Required Description
ToUserName string Is Return as is fromUserName in the request
FromUserName string Is Express company small program UserName
CreateTime number Is Event time, Unix timestamp
MsgType string Is Message type, pinned to event
Event string Is The event type, fixed to cancel_waybill, is case insensescies
BizID string Is Merchant ID, please return as is
OrderID string Is The ID that uniquely identifies the order and is generated by the merchant. Please return as is
WayBillID string Is Ticket ID, please return as is
ResultCode number Is Process the result error code
ResultMsg string Is Details of the processing results

The legal value of ResultCode

Value Description The lowest version
0 The cancellation was successful
-1 Other errors
30001 Parameter error (BizID, OrderID, WayBillID do not exist)
30002 Already charged, can not be canceled
30003 Invalid single (if you have been canceled, or if you have more than a certain period of time), you cannot cancel
30004 Express does not support cancelling

Message data package

XML format

<xml>
    <ToUserName><![CDATA[gh_abcdefg]]></ToUserName>
    <FromUserName><![CDATA[oABCD]]></FromUserName>
    <CreateTime>1533042556</CreateTime>
    <MsgType><![CDATA[event]]></MsgType>
    <Event><![CDATA[cancel_waybill]]></Event>
    <BizID><![CDATA[xyz]]></BizID>
    <BizPwd><![CDATA[xyz123]]></BizPwd>
    <ShopAppID><![CDATA[wxABCD]]></ShopAppID>
    <OrderID><![CDATA[012345678901234567890123456789]]></OrderID>
    <WayBillID><![CDATA[123456789]]></WayBillID>
</xml>

JSON format

{
  "ToUserName": "gh_abcdefg",
  "FromUserName": "oABCD",
  "CreateTime": 1533042556,
  "MsgType": "event",
  "Event": "cancel_waybill",
  "BizID": "xyz",
  "BizPwd": "xyz123",
  "ShopAppID": "wxABCD",
  "OrderID": "012345678901234567890123456789",
  "WayBillID": "123456789"
}

Returns an example of a packet

XML format

<xml>
    <ToUserName><![CDATA[oABCD]]></ToUserName>
    <FromUserName><![CDATA[gh_abcdefg]]></FromUserName>
    <CreateTime>1533042556</CreateTime>
    <MsgType><![CDATA[event]]></MsgType>
    <Event><![CDATA[cancel_waybill]]></Event>
    <BizID><![CDATA[xyz]]></BizID>
    <OrderID><![CDATA[012345678901234567890123456789]]></OrderID>
    <WayBillID><![CDATA[123456789]]></WayBillID>
    <ResultCode>0</ResultCode>
    <ResultMsg><![CDATA[success]]></ResultMsg>
</xml>

JSON format

{
  "ToUserName": "oABCD",
  "FromUserName": "gh_abcdefg",
  "CreateTime": 1533042556,
  "MsgType": "event",
  "Event": "cancel_waybill",
  "BizID": "xyz",
  "OrderID": "012345678901234567890123456789",
  "WayBillID": "123456789",
  "ResultCode": 0,
  "ResultMsg": "success"
}