qr_pre_pay

package
v0.0.0-...-3b7ab86 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	B   xftpay.Backend
	Key string
}

func (Client) Pay

func (c Client) Pay(r *QrPrePayRequest) (s *QrPrePayResponse, err error)

type QrPrePayRequest

type QrPrePayRequest struct {
	AppID        string `json:"app_id"`
	MerchantCode string `json:"merchant_code"`
	StoreCode    string `json:"store_code"`
	OperatorID   string `json:"operator_id"`
	OutTradeNo   string `json:"out_trade_no"`
	Amount       string `json:"amount"`
	Extra        string `json:"extra"`
	// Extra        struct {
	// 	QrCode2Img string `json:"qr_code_to_img"`
	// } `json:"extra"`
	SignType string `json:"sign_type"`
	Sign     string `json:"sign"`
}

type QrPrePayResponse

type QrPrePayResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Result  bool   `json:"result"`
	Data    struct {
		OutTradeNo string `json:"out_trade_no"`
		Credential string `json:"credential"`
		// Credential struct {
		// 	QrCode       string `json:"qr_code"`
		// 	QrCodeImgURL string `json:"qr_code_img_url"`
		// } `json:"credential"`
		FailureCode string `json:"failure_code"`
		FailureMsg  string `json:"failure_msg"`
		SignType    string `json:"sign_type"`
		Sign        string `json:"sign"`
	}
}

func Pay

func Pay(r *QrPrePayRequest) (s *QrPrePayResponse, err error)

Jump to

Keyboard shortcuts

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