paynow

package
v1.2.54 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePayNowPay

func CreatePayNowPay(out_order_no, amount string) (pay_url, order_sn string, err error)

func InitPaynow

func InitPaynow(access_key, wallet_sn, key, notify_url, redirect_url, output_notify_url string)

func MD5

func MD5(str string) string

check

func PayNowPayCallback

func PayNowPayCallback(body []byte) (out_order_sn, amount string, err error)

func PaynowCheck

func PaynowCheck(data any, key, sign string) bool

func PaynowPayOutput

func PaynowPayOutput(out_order_sn, bank_name, bank_account, name, amount string) (order_sn string, err error)

func PaynowPayOutputCallback

func PaynowPayOutputCallback(body []byte) (order_sn, amount string, err error)

func PaynowSign

func PaynowSign(data any, key string) string

sign

func PaynowSignByMap

func PaynowSignByMap(data map[string]string, key string) string

Types

type CreatePayNowPayRequest

type CreatePayNowPayRequest struct {
	AccessKey   string `json:"access_key"`
	WalletSn    string `json:"wallet_sn"`
	Method      string `json:"method"`
	OutOrderSn  string `json:"out_order_sn"`
	Amount      string `json:"amount"`
	NotifyUrl   string `json:"notify_url"`
	RedirectUrl string `json:"redirect_url"`
	Sign        string `json:"sign"`
}

CreatePay

type PayNowCreatePayResponse

type PayNowCreatePayResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		OrderSn string `json:"order_sn"`
		Url     string `json:"url"`
	} `json:"data"`
}

type PayNowPayCallbackRequest

type PayNowPayCallbackRequest struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		Type       string `json:"type"`
		OrderSn    string `json:"order_sn"`
		OutOrderSn string `json:"out_order_sn"`
		Amount     string `json:"amount"`
		ActAmount  string `json:"act_amount"`
		PayTime    int    `json:"pay_time"`
		Errmsg     string `json:"errmsg"`
	} `json:"data"`
	Sign string `json:"sign"`
}

type PaynowPayOutputCallbackResponse

type PaynowPayOutputCallbackResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		Type       string `json:"type"`
		OrderSn    string `json:"order_sn"`
		OutOrderSn string `json:"out_order_sn"`
		Amount     string `json:"amount"`
		Errmsg     string `json:"errmsg"`
		PayTime    int    `json:"pay_time"`
	} `json:"data"`
	Sign string `json:"sign"`
}

type PaynowPayOutputResponse

type PaynowPayOutputResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		OrderSn string `json:"order_sn"`
		Status  int    `json:"status"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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