Documentation ¶
Index ¶
- func Add(money float64, money2 float64, precision int32) float64
- func AddFloat(money float64, money2 float64, precision int32) string
- func Cut(money float64, precision int32) float64
- func CutFloat(money float64, precision int32) string
- func Div(money float64, money2 float64, precision int32) float64
- func DivFloat(money float64, money2 float64, precision int32) string
- func Get(platform string) (driver func() Driver)
- func Mul(money float64, multiple float64, precision int32) float64
- func MulFloat(money float64, multiple float64, precision int32) string
- func Name(platform string) string
- func NotifyIsPay(result param.StringMap) bool
- func NotifyIsRefund(result param.StringMap) bool
- func Platforms() map[string]string
- func Register(platform string, name string, hook func() Driver, ...)
- func Sub(money float64, money2 float64, precision int32) float64
- func SubFloat(money float64, money2 float64, precision int32) string
- func Unregister(platform string)
- type Base
- func (a *Base) IsSupported(s config.Support) bool
- func (a *Base) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, error)
- func (a *Base) PayNotify(ctx echo.Context) error
- func (a *Base) PayQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Base) Refund(ctx echo.Context, cfg *config.Refund) (*config.Result, error)
- func (a *Base) RefundNotify(ctx echo.Context) error
- func (a *Base) RefundQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Base) SetAccount(account *config.Account) Driver
- func (a *Base) SetNotifyCallback(callback func(echo.Context) error) Driver
- func (a *Base) VerifySign(ctx echo.Context) error
- type Driver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotifyIsRefund ¶ added in v0.0.5
NotifyIsRefund 是退款通知
func Unregister ¶ added in v0.2.3
func Unregister(platform string)
Types ¶
type Base ¶ added in v0.3.14
func (*Base) RefundNotify ¶ added in v0.3.14
RefundNotify 退款回调处理 ! *务必在内部验证签名*
func (*Base) RefundQuery ¶ added in v0.3.14
RefundQuery 退款查询
func (*Base) SetAccount ¶ added in v0.3.14
func (*Base) SetNotifyCallback ¶ added in v0.3.14
type Driver ¶ added in v0.5.0
type Driver interface { IsSupported(config.Support) bool SetNotifyCallback(callback func(echo.Context) error) Driver SetAccount(*config.Account) Driver Pay(echo.Context, *config.Pay) (*config.PayResponse, error) PayQuery(echo.Context, *config.Query) (*config.Result, error) PayNotify(echo.Context) error //! *务必在内部验证签名* Refund(echo.Context, *config.Refund) (*config.Result, error) RefundQuery(echo.Context, *config.Query) (*config.Result, error) RefundNotify(echo.Context) error //! *务必在内部验证签名* VerifySign(echo.Context) error }
Driver 付款驱动接口
Click to show internal directories.
Click to hide internal directories.