pay

package module
v0.0.0-...-28ce3ff Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

一、安装

go get -u github.com/whrwsoftware/payment

二、文档目录

点击查看不同支付方式的使用文档。


三、其他说明

  • 各支付方式接入,请仔细查看 xxx_test.go 使用方式

    • pay/wechat/v3/client_test.go
    • pay/alipay/client_test.go
    • pay/qq/client_test.go
    • pay/paypal/client_test.go
    • pay/apple/verify_test.go
    • 或 examples
  • 开发过程中,请尽量使用正式环境,1分钱测试法!

Documentation

Index

Constants

View Source
const (
	NULL     = ""
	SUCCESS  = "SUCCESS"
	FAIL     = "FAIL"
	OK       = "OK"
	DebugOff = 0
	DebugOn  = 1
	Version  = "1.5.86"
)

Variables

View Source
var (
	MissWechatInitParamErr = errors.New("missing wechat init parameter")
	MissAlipayInitParamErr = errors.New("missing alipay init parameter")
	MissPayPalInitParamErr = errors.New("missing paypal init parameter")
	MissParamErr           = errors.New("missing required parameter")
	MarshalErr             = errors.New("marshal error")
	UnmarshalErr           = errors.New("unmarshal error")
	SignatureErr           = errors.New("signature error")
	VerifySignatureErr     = errors.New("verify signature error")
	CertNotMatchErr        = errors.New("cert not match error")
	GetSignDataErr         = errors.New("get signature data error")
)

Functions

This section is empty.

Types

type BodyMap

type BodyMap map[string]interface{}

func (BodyMap) CheckEmptyError

func (bm BodyMap) CheckEmptyError(keys ...string) error

func (BodyMap) EncodeAliPaySignParams

func (bm BodyMap) EncodeAliPaySignParams() string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) EncodeURLParams

func (bm BodyMap) EncodeURLParams() string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) EncodeWeChatSignParams

func (bm BodyMap) EncodeWeChatSignParams(apiKey string) string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) Get

func (bm BodyMap) Get(key string) string

获取参数,同 GetString()

func (BodyMap) GetInterface

func (bm BodyMap) GetInterface(key string) interface{}

获取原始参数

func (BodyMap) GetString

func (bm BodyMap) GetString(key string) string

获取参数转换string

func (BodyMap) JsonBody

func (bm BodyMap) JsonBody() (jb string)

func (BodyMap) MarshalXML

func (bm BodyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (BodyMap) Remove

func (bm BodyMap) Remove(key string)

删除参数

func (BodyMap) Reset

func (bm BodyMap) Reset()

置空BodyMap

func (BodyMap) Set

func (bm BodyMap) Set(key string, value interface{}) BodyMap

设置参数

func (BodyMap) SetBodyMap

func (bm BodyMap) SetBodyMap(key string, value func(b BodyMap)) BodyMap

func (BodyMap) SetFormFile

func (bm BodyMap) SetFormFile(key string, file *util.File) BodyMap

设置 FormFile

func (BodyMap) Unmarshal

func (bm BodyMap) Unmarshal(ptr interface{}) (err error)

Unmarshal to struct or slice point

func (*BodyMap) UnmarshalXML

func (bm *BodyMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type DebugSwitch

type DebugSwitch int8

Directories

Path Synopsis
apple 苹果应用内支付SDK(目前仅支持一个校验逻辑--服务端模式)。
apple 苹果应用内支付SDK(目前仅支持一个校验逻辑--服务端模式)。
@Author: wzy @Time: 2022/6/7
@Author: wzy @Time: 2022/6/7
pkg
aes
jwt
v3

Jump to

Keyboard shortcuts

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