html5 WeChat public account development, WeChat open document

Function Description

Shake the surrounding red envelope interface is a red envelope function provided for offline merchants. Users can receive red envelopes issued by merchants by shaking their surroundings in offline places such as merchant stores. Online forwarding and sharing are invalid.

Developers can develop the Shake Red Packet function through the interface. Features include:

You can choose to use the template loading page or the custom Html5 page to call up the WeChat native red envelope page (see the use_template field in the red envelope creation activity, 1 is to use the template, 2 is to use the custom Html5 page)

The original red envelope page unpacks red envelopes, no need to send through the public account message

Provide the ability to follow the official account, users can choose whether to follow (invalid when fission red envelopes are shared)

The jump link can be configured on the completion page, and you can jump to other custom Html5 pages of the merchant

The same user can only receive 1 red envelope in a single red envelope activity

User-side interaction process

402af62f98d92d688f9aeaf1c4556e20.png

852987ebb1a9fcc73bc5748e7b4b6eab.png

Red Packet Component Interface Call Process

Apply for the red envelope interface permission: log in to the backend of the surrounding merchants https://zb.weixin.qq.com , enter the developer support, and apply for the opening of the shake red envelope component interface;

Red envelope pre-order: call WeChat Pay's api to pre-order red envelopes, inform the amount of red envelopes to be issued, the number of people, and generate red envelope tickets;

Create an event and enter the red envelope information: call the API of the surrounding platform to enter the create red envelope activity and enter the information, and pass in the red envelope ticket generated when the pre-order is placed;

Call jsapi to draw red envelopes: in the shake-out page, by calling jsapi to draw red envelopes, users who have won the red envelopes can open the red envelopes;

When calling the above interface, the requirements for the official account of the red envelope provider and the red envelope issuer are the same.

illustrate:

Red envelope provider: the merchant represented by the parameter wxappid passed in the red envelope pre-order interface

Red Packet Distributing Merchant: Call the red packet interface to create red packet activities, enter red packet information, and issue the official account of the red packet merchant

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324475978&siteId=291194637