pay

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timestamp int64
	NonceStr  string
	PrePayID  string
	SignType  string
	Sign      string
}

Config 是传出用于 jsdk 用的参数

type Params

type Params struct {
	TotalFee   string
	CreateIP   string
	Body       string
	OutTradeNo string
	OpenID     string
}

Params was NEEDED when request unifiedorder 传入的参数,用于生成 prepay_id 的必需参数

type Pay

type Pay struct {
	*context.Context
}

Pay struct extends context

func NewPay

func NewPay(ctx *context.Context) *Pay

NewPay return an instance of Pay package

func (*Pay) PrePayID

func (pcf *Pay) PrePayID(p *Params) (prePayID string, err error)

PrePayID will request wechat merchant api and request for a pre payment order id

Jump to

Keyboard shortcuts

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