payment

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

payment

通用GO语言付款包

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutFloat

func CutFloat(money float64, precision int32) string

CutFloat 非四舍五入的方式保留小数位数 @param money 金额 @param precision 小数位数

func Get

func Get(platform string) (hook func() Hook)

func MulFloat

func MulFloat(money float64, multiple float64, precision int32) string

MulFloat 小数相乘 @param money 金额 @param multiple 乘数 @param precision 小数位数

func Name

func Name(platform string) string

func Platforms

func Platforms() map[string]string

func Register

func Register(platform string, name string, hook func() Hook)

Types

type Hook

type Hook interface {
	SetNotifyCallback(callback func(echo.Context) error) Hook
	SetAccount(*config.Account) Hook
	Pay(*config.Pay) (param.StringMap, error)
	Notify(echo.Context) error
	Refund(*config.Refund) (param.StringMap, error)
}

Directories

Path Synopsis
driver

Jump to

Keyboard shortcuts

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