lucky_money

package
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lucky_money 现金红包

Package lucky_money 现金红包

Package lucky_money 现金红包

Package lucky_money 现金红包

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHBInfo

func GetHBInfo(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

查询红包记录

用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。

See: https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_6&index=5

POST https://api.mch.weixin.qq.com/mmpaymkttransfers/gethbinfo

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/lucky_money"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := lucky_money.GetHBInfo(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SendGroupRedPack

func SendGroupRedPack(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

发放裂变红包

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

See: https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_5&index=4

POST https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/lucky_money"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := lucky_money.SendGroupRedPack(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SendMiniprogramHB

func SendMiniprogramHB(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

小程序红包-发放

See: https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=18_2&index=3

POST hhttps://api.mch.weixin.qq.com/mmpaymkttransfers/sendminiprogramhb

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/lucky_money"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := lucky_money.SendMiniprogramHB(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SendRedPack

func SendRedPack(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

发放红包接口

1.发送频率限制------默认1800/min

2.发送个数上限------默认1800/min

3.场景金额限制------默认红包金额为1-200元,如有需要,可前往商户平台进行设置和申请

4.其他限制------商户单日出资金额上限--100万元;单用户单日收款金额上限--1000元;单用户可领取红包个数上限--10个;

See: https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_4&index=3

POST https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/lucky_money"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := lucky_money.SendRedPack(ctx, params)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL