https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1445241432
Online testing: The purpose is to test whether the developer’s code logic is wrong and meets expectations. Even if the test is successful, the content will not be sent to fans. So feel free to test.
Get access_token
In the interface debugging tool of wechat public platform, enter APPId and APPSecret to obtain access_token: mp.weixin.qq.com/debug/
Logical flow chart
Card voucher
- Online verification: the user from the full access to an H5 web page after the initiative to cancel the coupon process, also known as the mall with voucher verification and self-help verification
- Offline verification: after guests arrive at the store to show the coupon code or string code, the cashier scan to complete the verification action, also known as scan code verification or machine verification
Offline verification process
- Query code interface: and deal with illegal codes (e.g. in transfer, deleted, cancelled, etc.) before write-off.
-
The HTTP request method: POSTURL:https://api.weixin.qq.com/card/code/get?access_token=TOKEN parameters: post data + access_token {"card_id" : "card_id_123+", // The only standard for single card coupons"code" : "123456789", // Card coupon ID represents a class of coupon. Custom code Card coupon requires the code parameter"check_consume" : true// Whether to check the verification status of code, entertrueandfalseReturns different data}Copy the code
- Verification code interface: consumption code interface, is the only interface to cancel after verification stamps, developers will be able to call the interface to cancel after verification of coupons, the irreversible process of https://api.weixin.qq.com/card/code/consume?access_token
- EasyWechat: Encapsulated wechat documents
Difference between UnionId and openId
UnionId: Developers can obtain basic user information through OpenID. In particular, it should be noted that if the developer has multiple mobile applications, website applications and public accounts, the uniqueness of the user can be distinguished by obtaining the unionID in the user’s basic information, because as long as it is the same wechat open platform account under the mobile application, website applications and public accounts, the user’s unionID is unique. In other words, the same user, different applications under the same wechat open platform, unionID is the same.
OpenId: After message interaction between the follower and the public account, the public account can obtain the follower’s openId (encrypted wechat signal, and each user’s openId of each public account is unique. For different public accounts, the openID of the same user is different. Through this interface, public accounts can obtain user basic information according to OpenID, including nickname, profile picture, gender, city, language and following time.
The subscription number and service number can be associated with the same applet
Each public account subject can be associated with 10 small programs of the same subject and 3 small programs of different subjects