当前位置:网站首页>小程序企业发放红包功能
小程序企业发放红包功能
2022-07-25 09:24:00 【|刘钊|】
注意:
使用小程序红包的领取需要公众号的openid,而企业付款到零钱则直接使用的是小程序的openid
个人建议使用企业付款到零钱的方式发放红包
原因:
小程序的红包只能通过扫码的方式进入的小程序才能领取红包,见链接,需要讨论;
https://pay.weixin.qq.com/wiki/doc/api/tools/miniprogram_hb.php?chapter=18_4&index=1
https://developers.weixin.qq.com/community/develop/doc/00006450df4f183f449969b4f54c00

1、企业付款到零钱:
https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_1
直接使用小程序的openid;
注意:
- 1、商户号(或同主体其他非服务商商户号)已入驻90日
- 2、截止今日回推30天,商户号(或同主体其他非服务商商户号)连续不间断保持有交易
- 3、 登录微信支付商户平台-产品中心,开通企业付款。
2、小程序红包
https://pay.weixin.qq.com/wiki/doc/api/tools/miniprogram_hb.php?chapter=13_8&index=1
如果必须使用小程序的红包功能,则需要公众号的openid;
小程序领取红包实现方案:
从小程序web-view到公众号网页,使用jssdk获取用户信息,拿到公众号的openid,然后通过js-sdk跳回小程序,从而实现红包的领取;
3、 微信小程序发红包接口调用流程
1. 后台API调用:待进入联调过程时与开发进行详细沟通;
2. 告知服务器:告知服务器接收微信红包的用户openID,告知服务器该用户获得的金额;
3. 从商户号扣款:服务器获取信息后从对应商户号的可用余额中扣除对应的金额;
4. 调用失败:因不符合发送规则,商户号余额不足等原因造成调用失败,反馈至调用方;
5. 红包创建成功:返回红包package;
6. 小程序发放红包:用户在小程序里通过jsapi领取并拆开红包;

小程序端领取红包代码实现:
|
边栏推荐
- [RNN] analyze the RNN from rnn- (simple|lstm) to sequence generation, and then to seq2seq framework (encoder decoder, or seq2seq)
- Introduction to low power consumption and UPF
- C函数不加括号的教训
- 用ESP32+TM1638实验NTP网络校时闹钟的ARDUINO代码
- 数据分析面试记录1-5
- CCF 201503-3 Festival
- MLX90640 红外热成像仪测温模块开发笔记(五)
- About student management system (registration, login, student side)
- 手持振弦VH501TC采集仪传感器的连接与数据读取
- NLM5系列无线振弦传感采集仪的工作模式及休眠模式下状态
猜你喜欢

Connection and data reading of hand-held vibrating wire vh501tc collector sensor

手持振弦采集仪对振弦传感器激励方法和激励电压

CCF 201512-4 delivery

Solve the Chinese garbled code error of qtcreator compiling with vs

Fundamentals of C language

BSP3 电力监控仪(功率监控仪)端子定义和接线

CDA LEVELⅠ2021新版模拟题一(附答案)

TensorFlow raw_ RNN - implement the seq2seq mode to take the output of the previous time as the input of the next time

ARMv8通用定时器简介

Mlx90640 infrared thermal imager temperature measurement module development instructions
随机推荐
FLASH read / write operation and flash upload file of esp8266
CCF 201604-2 Tetris
VScode配置ROS开发环境:修改代码不生效问题原因及解决方法
Mixed supervision for surface defect detection: from weakly to fully supervised learning
CCF 201503-3 Festival
AMD EPYC 9664旗舰规格曝光:96核192线程 480MB缓存 3.8GHz频率
T5论文总结
The economic basis of a hardware siege lion
Introduction to low power consumption and UPF
[machine translation] scones -- machine translation with multi tag tasks
Introduction to armv8 general timer
CCF 201604-2 俄罗斯方块
File -- first acquaintance
Terminal definition and wiring of bsp3 power monitor (power monitor)
@5-1 CCF 2019-12-1 reporting
Hyperautomation for the enhancement of automation in industries 论文翻译
CDA Level1多选题精选
从Anaconda到TensorFlow到Jupyter一路踩坑一路填平
Mlx90640 infrared thermal imaging sensor temperature measurement module development notes (II)
Connection and data reading of hand-held vibrating wire vh501tc collector sensor