payment

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWeChatPayClient added in v1.4.10

func GetWeChatPayClient() *core.Client

GetWeChatPayClient 获取BlockChain客户端

Types

type AdapterPaymentService

type AdapterPaymentService interface {
	String() string
	GetCertificates() (*x509.Certificate, error)
	PrePay(orderId string, amount int64, payerOpenId string, attach string, description string, expireAt time.Time, callbackAddr string) (string, error)
	Refund(orderId string, transactionId string, refundId string, reason string, amount int64, total int64, currency string, callbackAddr string) (string, error)
}

type WeChatPay

type WeChatPay struct {
	// contains filtered or unexported fields
}

func NewWeChatPay

func NewWeChatPay(client *core.Client, merchantId string, appId string, apiKey string, serialNo string, privateKeyPath string, certPath string) *WeChatPay

func (*WeChatPay) Close

func (m *WeChatPay) Close()

Close 关闭连接

func (*WeChatPay) GetCertificates added in v1.4.10

func (m *WeChatPay) GetCertificates() (*x509.Certificate, error)

func (*WeChatPay) GetClient

func (m *WeChatPay) GetClient() *core.Client

GetClient 暴露原生client

func (*WeChatPay) GetPrivateKey added in v1.4.11

func (m *WeChatPay) GetPrivateKey() (*rsa.PrivateKey, error)

func (*WeChatPay) PrePay

func (m *WeChatPay) PrePay(orderId string, amount int64, payerOpenId string, attach string, description string, expireAt time.Time, callbackAddr string) (string, error)

func (*WeChatPay) Refund

func (m *WeChatPay) Refund(orderId string, transactionId string, refundId string, reason string, amount int64, total int64, currency string, callbackAddr string) (string, error)

func (*WeChatPay) String

func (m *WeChatPay) String() string

Jump to

Keyboard shortcuts

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