payment

package
v3.0.30 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapUserConfig

func MapUserConfig(userConfig *UserConfig) (*object.HashMap, error)

Types

type Http

type Http struct {
	Timeout float64
	BaseURI string
}

type Log

type Log struct {
	Level string
	File  string
	ENV   string
}

type OAuth

type OAuth struct {
	Callback string
	Scopes   []string
}

type Payment

type Payment struct {
	kernel2.ApplicationPaymentInterface
	*kernel.ServiceContainer

	Config *kernel.Config

	Order   *order.Client
	Partner *partner.Client
	JSSDK   *jssdk.Client
	Sandbox *sandbox.Client

	Refund *refund.Client
	Bill   *bill.Client

	RedPack       *redpack.Client
	Transfer      *transfer.Client
	TransferBatch *transfer.BatchClient
	Reverse       *reverse.Client
	ProfitSharing *profitSharing.Client

	Base *base.Client

	Security *security.Client

	Logger *logger.Logger
}

func NewPayment

func NewPayment(config *UserConfig) (*Payment, error)

func (*Payment) CodeUrlScheme

func (app *Payment) CodeUrlScheme(codeUrl string) string

func (*Payment) GetAccessToken

func (app *Payment) GetAccessToken() *kernel.AccessToken

func (*Payment) GetComponent

func (app *Payment) GetComponent(name string) interface{}

func (*Payment) GetConfig

func (app *Payment) GetConfig() *kernel.Config

func (*Payment) GetContainer

func (app *Payment) GetContainer() *kernel.ServiceContainer

func (*Payment) GetKey

func (app *Payment) GetKey(endpoint string) (string, error)

func (*Payment) HandlePaidNotify

func (app *Payment) HandlePaidNotify(request *http.Request, closure func(message *request.RequestNotify, transaction *models.Transaction, fail func(message string)) interface{}) (*http.Response, error)

func (*Payment) HandleRefundedNotify

func (app *Payment) HandleRefundedNotify(request *http.Request, closure func(message *request.RequestNotify, transaction *models.Refund, fail func(message string)) interface{}) (*http.Response, error)

func (*Payment) HandleScannedNotify

func (app *Payment) HandleScannedNotify(request *http.Request, closure func(message *request.RequestNotify, fail func(message string), alert func(message string)) interface{}) (*http.Response, error)

func (*Payment) InSandbox

func (app *Payment) InSandbox() bool

func (*Payment) Scheme

func (app *Payment) Scheme(productID string) string

func (*Payment) SetSubMerchant

func (app *Payment) SetSubMerchant(mchID string, appID string) kernel2.ApplicationPaymentInterface

type UserConfig

type UserConfig struct {
	AppID              string
	MchID              string
	MchApiV3Key        string
	Key                string
	CertPath           string
	KeyPath            string
	SerialNo           string
	CertificateKeyPath string
	WechatPaySerial    string
	RSAPublicKeyPath   string
	SpAppID            string
	SpMchID            string
	SubAppID           string
	SubMchID           string
	Http               Http

	ResponseType string
	Log          Log
	OAuth        OAuth
	Cache        kernel.CacheInterface

	HttpDebug bool
	Debug     bool
	NotifyURL string
	Sandbox   bool
}

Jump to

Keyboard shortcuts

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