Skip to content

发放裂变红包

裂变红包:一次可以发放一组红包。首先领取的用户为种子用户,种子用户领取一组红包当中的一个,并可以通过社交分享将剩下的红包给其他用户。裂变红包充分利用了人际传播的优势。 官方文档 官方文档

js
const { 
Transformer
} =
require
('wechatpay-axios-plugin')
wxpay
.
v2
.
mmpaymkttransfers
.
sendgroupredpack
.
post
({
nonce_str
,
mch_billno
,
mch_id
,
sub_mch_id
,
wxappid
,
msgappid
,
send_name
,
re_openid
,
total_amount
,
total_num
,
amt_type
,
wishing
,
act_name
,
remark
,
scene_id
,
risk_info
,
}, {
security
,
transformResponse
: [
Transformer
.
toObject
], })
.
then
(
({
data
: {
return_code
,
return_msg
,
result_code
,
err_code
,
err_code_des
,
mch_billno
,
mch_id
,
wxappid
,
re_openid
,
total_amount
,
send_listid
,
}, }) => ({
return_code
,
return_msg
,
result_code
,
err_code
,
err_code_des
,
mch_billno
,
mch_id
,
wxappid
,
re_openid
,
total_amount
,
send_listid
,
}) )

Released under the MIT License. (SITEMAP)