costom

package
v3.4.41 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomHandler

type CustomHandler struct {
	App     kernel.ApplicationPaymentInterface
	Message *request.RequestNotify

	Attributes *object.StringMap
	Check      bool
	Sign       bool

	ExternalBody io.Reader
	// contains filtered or unexported fields
}

func (*CustomHandler) DecryptMessage

func (handler *CustomHandler) DecryptMessage() (string, error)

func (*CustomHandler) Fail

func (handler *CustomHandler) Fail(message string)

func (*CustomHandler) GetMessage

func (handler *CustomHandler) GetMessage() (notify *request.RequestNotify, err error)

func (*CustomHandler) RespondWith

func (handler *CustomHandler) RespondWith(attributes *object.StringMap, sign bool) *CustomHandler

func (*CustomHandler) Strict

func (handler *CustomHandler) Strict(result interface{})

func (*CustomHandler) ToResponse

func (handler *CustomHandler) ToResponse() (response *http.Response, err error)

type CustomNotify

type CustomNotify[T any] struct {
	*CustomHandler
}

CustomNotify 框架内没有实现的,可以使用这个自己实现

func NewCustomNotify

func NewCustomNotify[T any](app kernel.ApplicationPaymentInterface, body io.Reader) *CustomNotify[T]

func (*CustomNotify[T]) Handle

func (comp *CustomNotify[T]) Handle(closure func(message *request.RequestNotify, transaction *T, fail func(message string)) interface{}) (*http.Response, error)

Jump to

Keyboard shortcuts

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