wxpay

package module
v0.0.0-...-1fa7430 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

wxpay

全新的微信支付API v3 SDK for golang

SDK for golang 提供 V3 接口分类:

  • 微信支付分
  • 营销
    • 代金券
    • 商家券
    • 小程序发券插件
  • 电商收付通
  • 其他
  • 通用接口

安装

$ go get -u github.com/yunlyz/wxpay

go module

require github.com/yunlyz/wxpay latest

Demo


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOptions

func AddOptions(s string, opt interface{}) (string, error)

func CertificateDecrypt

func CertificateDecrypt(ciphertext []byte, key, nonce, associated string) (str string, err error)

CertificateDecrypt using AES-256-GCM algorithm to decrypt ciphertext Notice: ciphertext is decrypted after base64

Types

type ErrorMessage

type ErrorMessage struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Service

type Service struct {
	Client *WxPay
}

type WxPay

type WxPay struct {
	BaseURL *url.URL

	MchId      int64
	SerialNo   string
	PrivateKey string
	PublicKey  string
	// contains filtered or unexported fields
}

func New

func New(mchId int64, serialNo, privateKey, publicKey string) *WxPay

func (*WxPay) Busifavor

func (pay *WxPay) Busifavor()

func (*WxPay) Common

func (pay *WxPay) Common()

func (*WxPay) Do

func (pay *WxPay) Do(req *http.Request, v interface{}) (err error)

func (*WxPay) Favor

func (pay *WxPay) Favor() *favor.Favor

func (*WxPay) MiniProgram

func (pay *WxPay) MiniProgram()

func (*WxPay) NewRequest

func (pay *WxPay) NewRequest(method, rawurl string, body interface{}) (req *http.Request, err error)

func (*WxPay) Other

func (pay *WxPay) Other()

func (*WxPay) PayScore

func (pay *WxPay) PayScore()

Directories

Path Synopsis
marketing

Jump to

Keyboard shortcuts

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