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

WeChat small program Instant distribution interface (business view) development must read


May 18, 2021 WeChat Mini Program Development Document


Table of contents


Development must-read

Business access ready

  1. Small programs for WeChat authentication
  2. Open event push, set event address: log in to the background of the small program, develop - development settings - message push - enable
  3. Message encryption uses secure mode, and the data format is JSON
  4. If authorized to a third party, step 2 is not required
  5. Register your account with the shipping company and make authorization bindings in the background of the small program

The name is explained

  1. Appkey: The appropriate appkey value that is generally assigned to a merchant after logging into the distribution company open flat
  2. AppSecret: The appropriate key that a merchant typically assigns after logging into the distribution company to open flat
  3. Shopid: WeChat platform field, corresponding to the distribution company's appkey
  4. shop_no: Merchants to different stores of the number, need to be registered in the distribution company system, such as the merchant's own store system has 100 stores, the number is 1-100, in the system of Shunfeng Tongcheng has registered these 100 stores, and in Shunfeng Tongcheng registration number is also 1-100, then the time of the order shop_no- 1, that is, the number 1 under the store distribution order
  5. Shop: A field for order requests, merchant information, is displayed in the logistics notification message, as shown in the following image WeChat small program Instant distribution interface (business view) development must read
  6. The pick-up code and receipt code requested by the order: the pick-up code refers to the rider here to pick up the goods, the merchant shows the pick-up code, the rider can complete the pick-up; Merchants can set whether pickup and receipt codes need to be turned on on in the distribution company's open platform

Call the API interface description

  1. Coding method: UTF-8
  2. Data format: json
  3. Submit mode: POST
  4. The order is required to use the bound ShopID and AppSecret, where Shopid is the appKey, AppSecret, which distributes the company account, and the secret key corresponding to the company account.
  5. Resultcode error code and resultMSG error description are defined by the performance, the WeChat side is responsible for transparing, only unified definition code = 0 means success
  6. In addition to the addition of the platform itself and the signature, and orders related requests also need to bring the capacity side signature_sign, the signature rules are
  7. If there is a field Shop_order_ID in the interface request, Delivery_SIGN = SHA1 (SHOPID + Shop_Order_ID + Appsecret), where Shopid corresponds to the AppKey, Shop_order_id corresponding to the power side, and AppSecret, the secret key corresponding to the company account.
  8. If there is no field Shop_order_ID in the request, Delivery_SIGN = SHA1 (SHOPID + AppSecret), where Shopid corresponds to the APPKEY, AppSecret, and the secret key corresponding to the company account.
  9. Example: ShopID = "Test_Shop_ID", Shop_Order_ID = "Test_Shop_Order_ID", AppSecret = "Test_App_SecRect", Delivery_Sign = "A93D8D6BAE9A9483C1B1D4E8670E7F6226EC94CB"

Error code description

Error code The error description
930555 WeChat platform system error
930556 The delivery company timed out
930557 The delivery company system is wrong
930558 The distribution company has a logical error
930559 Openid is not valid
930560 Unbound merchant number
930561 The argument is wrong
930562 A delivery order already exists
930563 The delivery order does not exist
930564 The call has no quota
930565 The delivery order has ended
9300535 Shop field commodity thumbnail url, product name is empty or illegal, or the quantity of goods is 0
Other error codes The error code returned by the shipping company