membercard

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package membercard 会员卡专区

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activate

func Activate(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

激活用户领取的会员卡(跳转型开卡组件)

开发者可以通过该接口获取到用户开卡时填写的字段值

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html

POST https://api.weixin.qq.com/card/membercard/activate?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.Activate(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func ActivateGetUrl

func ActivateGetUrl(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

获取开卡插件参数

开发者可以通过该接口获取到调用开卡插件所需的参数

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html

POST https://api.weixin.qq.com/card/membercard/activate/geturl?access_token=

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.ActivateGetUrl(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func ActivateTempInfoGet

func ActivateTempInfoGet(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

获取用户开卡时提交的信息(跳转型开卡组件)

开发者可以通过该接口获取到用户开卡时填写的字段值

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html

POST https://api.weixin.qq.com/card/membercard/activatetempinfo/get?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.ActivateTempInfoGet(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func ActivateUserFormSet

func ActivateUserFormSet(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

设置开卡字段

开发者在创建时填入wx_activate字段后,需要调用该接口设置用户激活时需要填写的选项,否则一键开卡设置不生效

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html

POST https://api.weixin.qq.com/card/membercard/activateuserform/set?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.ActivateUserFormSet(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func PayGiftcardAdd

func PayGiftcardAdd(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

设置支付后投放卡券

支持商户设置支付后投放卡券规则,可以区分时间段和金额区间发会员卡

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html

POST https://api.weixin.qq.com/card/paygiftcard/add?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.PayGiftcardAdd(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func PayGiftcardBatchGet

func PayGiftcardBatchGet(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

批量查询支付后投放卡券规则

可以批量查询某个商户支付即会员规则内容

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html

POST https://api.weixin.qq.com/card/paygiftcard/batchget?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.PayGiftcardBatchGet(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func PayGiftcardDelete

func PayGiftcardDelete(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

删除支付后投放卡券规则

支持商户删除之前设置的规则id

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html

POST https://api.weixin.qq.com/card/paygiftcard/delete?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.PayGiftcardDelete(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func PayGiftcardGetById

func PayGiftcardGetById(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

查询支付后投放卡券规则详情

可以查询某个支付即会员规则内容

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html

POST https://api.weixin.qq.com/card/paygiftcard/getbyid?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.PayGiftcardGetById(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func UpdateUser

func UpdateUser(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

更新会员信息

当会员持卡消费后,支持开发者调用该接口更新会员信息。会员卡交易后的每次信息变更需通过该接口通知微信,便于后续消息通知及其他扩展功能

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html

POST https://api.weixin.qq.com/card/membercard/updateuser?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.UpdateUser(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func UserinfoGet

func UserinfoGet(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

拉取会员信息

支持开发者根据CardID和Code查询会员信息

See: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html

POST https://api.weixin.qq.com/card/membercard/userinfo/get?access_token=TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/card/membercard"
)

func main() {
	var ctx *offiaccount.OffiAccount

	payload := []byte("{}")
	resp, err := membercard.UserinfoGet(ctx, payload)

	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