pay

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alipay

type Alipay struct {
	AppID        string `json:"app_id"`
	PrivateKey   string `json:"private_key"`
	IsProduction bool   `json:"is_production"`
	NotifyURL    string `json:"notify_url"`
	// contains filtered or unexported fields
}

func NewAlipay

func NewAlipay(appID, privateKey string, isProduction bool) (p *Alipay, err error)

func (*Alipay) Query

func (a *Alipay) Query(orderID string) (q *alipay.TradeQueryResponse, err error)

func (*Alipay) SetNotifyURL

func (a *Alipay) SetNotifyURL(notifyURL string)

func (*Alipay) TransactionApp

func (a *Alipay) TransactionApp(description, orderID string, amount float64) (string, error)

type RuStore

type RuStore struct {
	KeyID       string `json:"key_id"`
	CompanyID   string `json:"company_id"`
	PrivateKey  string `json:"private_key"`
	PackageName string `json:"package_name"`
	// contains filtered or unexported fields
}

func NewRuStore

func NewRuStore(keyID, companyID, privateKey, packageName string) *RuStore

func (*RuStore) CheckStatus

func (r *RuStore) CheckStatus(p payments.GetTokenPaymentResponse) bool

func (*RuStore) GetPurchaseInfo

func (r *RuStore) GetPurchaseInfo(purchaseToken string) (p payments.GetTokenPaymentResponse, err error)

type Wxpay

type Wxpay struct {
	AppID      string `json:"app_id"`
	MchID      string `json:"mch_id"`
	SerialNo   string `json:"serial_no"`
	APIv3Key   string `json:"api_v3_key"`
	PrivateKey string `json:"private_key"`
	NotifyURL  string `json:"notify_url"`
	// contains filtered or unexported fields
}

func NewWxpay

func NewWxpay(appID, mchID, serialNo, apiv3Key, privateKey string) (p *Wxpay, err error)

func (*Wxpay) Query

func (w *Wxpay) Query(orderID string) (*wechat.QueryOrderRsp, error)

func (*Wxpay) SetNotifyURL

func (w *Wxpay) SetNotifyURL(notifyURL string)

func (*Wxpay) TransactionApp

func (w *Wxpay) TransactionApp(description string, orderID string, amount float64) (*wechat.AppPayParams, error)

Jump to

Keyboard shortcuts

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