gopay

package module
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Logo was Loading Faild!

GoPay

微信、支付宝、PayPal、QQ 的 Golang 版本SDK

Github Github

Golang GoDoc Drone CI GitHub Release License


fork变更

在原版基础上支持自定义 httpclient 的功能



一、安装

  • v1.5.42 开始,仓库从 github.com/iGoogle-ink/gopay 迁移到 github.com/cedarwu/gopay
go get github.com/cedarwu/gopay
查看 GoPay 版本

版本更新记录

import (
    "github.com/cedarwu/gopay"
    "github.com/cedarwu/gopay/pkg/xlog"
)

func main() {
    xlog.Info("GoPay Version: ", gopay.Version)
}


二、文档目录

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


三、其他说明

  • 各支付方式接入,请仔细查看 xxx_test.go 使用方式
    • wechat/client_test.go
    • alipay/client_test.go
    • qq/client_test.go
    • paypal/client_test.go
    • apple/verify_test.go
    • 或 examples
  • 有问题请加QQ群(加群验证答案:gopay),或加微信好友拉群。在此,非常感谢那些加群后,提出意见和反馈问题的同志们!
  • 开发过程中,请尽量使用正式环境,1分钱测试法!

QQ群: 加微信拉群:


License

Copyright 2019 Jerry

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyMap

type BodyMap map[string]interface{}

func (BodyMap) CheckEmptyError added in v1.6.0

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

func (BodyMap) EncodeAliPaySignParams added in v1.6.0

func (bm BodyMap) EncodeAliPaySignParams() string

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

func (BodyMap) EncodeURLParams added in v1.6.0

func (bm BodyMap) EncodeURLParams() string

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

func (BodyMap) EncodeWeChatSignParams added in v1.6.0

func (bm BodyMap) EncodeWeChatSignParams(apiKey string) string

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

func (BodyMap) Get

func (bm BodyMap) Get(key string) string

获取参数,同 GetString()

func (BodyMap) GetInterface added in v1.6.0

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

获取原始参数

func (BodyMap) GetString added in v1.6.0

func (bm BodyMap) GetString(key string) string

获取参数转换string

func (BodyMap) JsonBody added in v1.6.0

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

func (BodyMap) MarshalXML added in v1.6.0

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

func (BodyMap) Remove

func (bm BodyMap) Remove(key string)

删除参数

func (BodyMap) Reset added in v1.6.0

func (bm BodyMap) Reset()

置空BodyMap

func (BodyMap) Set

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

设置参数

func (BodyMap) SetBodyMap added in v1.6.0

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

func (BodyMap) SetFormFile added in v1.6.0

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

设置 FormFile

func (*BodyMap) UnmarshalXML added in v1.6.0

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

type DebugSwitch added in v1.6.0

type DebugSwitch int8

Directories

Path Synopsis
apple 苹果应用内支付SDK(目前仅支持一个校验逻辑--服务端模式)。
apple 苹果应用内支付SDK(目前仅支持一个校验逻辑--服务端模式)。
pkg
aes
v3

Jump to

Keyboard shortcuts

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