pay

package
v0.0.0-...-2b36f50 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedPkgClient

func NewRedPkgClient()

Types

type Client

type Client struct {
	Client      *core.Client
	AppID       string
	NotifyUrl   string
	MchID       string
	MchAPIv3Key string
}

func NewClient

func NewClient(conf WechatPayClientConf) (*Client, error)

func (*Client) JspCreateOrder

func (c *Client) JspCreateOrder(ctx context.Context, desc, outTradeNo, attach, openid string, amount int64) (response *jsapi.PrepayWithRequestPaymentResponse, result *core.APIResult, err error)

func (*Client) Refund

func (c *Client) Refund(ctx context.Context, transactionId, orderCode, outRefundCode, reason string, amount int64) (resp *refunddomestic.Refund, result *core.APIResult, err error)

type WechatPayClientConf

type WechatPayClientConf struct {
	AppID                      string
	MchID                      string // 商户号
	MchCertificateSerialNumber string // 商户证书序列号
	MchAPIv3Key                string //商户APIv3密钥
	PrivateKeyPath             string //私钥地址
	NotifyUrl                  string //通知地址
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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