pay

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 17 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 Message added in v1.1.9

type Message struct {
	IsTest       string `json:"is_test" xml:"is_test"`
	Channel      string `json:"channel" xml:"channel"`
	ChannelUID   string `json:"channel_uid" xml:"channel_uid"`
	GameOrder    string `json:"game_order" xml:"game_order"`
	OrderNo      string `json:"order_no" xml:"order_no"`
	PayTime      string `json:"pay_time" xml:"pay_time"`
	Amount       string `json:"amount" xml:"amount"`
	Status       string `json:"status" xml:"status"`
	ExtrasParams string `json:"extras_params" xml:"extras_params"`
}

type QuickCheckUserInfo added in v1.1.9

type QuickCheckUserInfo struct {
	Token       string `json:"token"`
	UID         string `json:"uid"`
	ProductCode string `json:"product_code"`
	ChannelCode string `json:"channel_code"`
}

func (*QuickCheckUserInfo) Encode added in v1.1.9

func (c *QuickCheckUserInfo) Encode() string

func (*QuickCheckUserInfo) String added in v1.1.9

func (c *QuickCheckUserInfo) String() string

type QuickClient added in v1.1.9

type QuickClient struct {
	MD5Key      string `json:"md5_key"`
	CallbackKey string `json:"callback_key"`
}

func NewQuickClient added in v1.1.9

func NewQuickClient(md5Key, callbackKey string) *QuickClient

func (*QuickClient) Decode added in v1.1.9

func (q *QuickClient) Decode(ndData string) (i *QuickCheckUserInfo, err error)

func (*QuickClient) VerifyOrder added in v1.1.9

func (q *QuickClient) VerifyOrder(ndData, sign, md5Sign string) bool

func (*QuickClient) VerifyUser added in v1.1.9

func (q *QuickClient) VerifyUser(c *QuickCheckUserInfo) string

type QuicksdkMessage added in v1.1.9

type QuicksdkMessage struct {
	XMLName xml.Name `xml:"quicksdk_message"`
	Message Message  `xml:"message"`
}

func (*QuicksdkMessage) GameOrder added in v1.1.9

func (n *QuicksdkMessage) GameOrder() string

func (*QuicksdkMessage) IsTest added in v1.1.9

func (n *QuicksdkMessage) IsTest() bool

func (*QuicksdkMessage) OrderNo added in v1.1.9

func (n *QuicksdkMessage) OrderNo() string

func (*QuicksdkMessage) String added in v1.1.9

func (n *QuicksdkMessage) String() string

func (*QuicksdkMessage) Success added in v1.1.9

func (n *QuicksdkMessage) Success() bool

func (*QuicksdkMessage) XML added in v1.1.9

func (n *QuicksdkMessage) XML() string

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