Documentation
¶
Index ¶
- Constants
- func AlipayCallback(form url.Values) (*alipay.TradeNotification, error)
- func AlipayPay(tradePay *TradePay) (map[string]string, error)
- func InitAlipay(appID, aliPublicKey, privateKey string, debug bool)
- func InitWxpay(appID, mchID, apiKey, certPath string, debug bool)
- func Notification(platform Platform, isSuccess bool) string
- func Pay(tradePay *TradePay) (map[string]string, error)
- func Refund(refund *TradeRefund) (interface{}, error)
- func WxpayCallback(body *[]byte) (map[string]string, error)
- func WxpayPay(tradePay *TradePay) (map[string]string, error)
- type Platform
- type TradePay
- type TradeRefund
Constants ¶
View Source
const ( App deviceType Web )
Variables ¶
This section is empty.
Functions ¶
func AlipayCallback ¶
func AlipayCallback(form url.Values) (*alipay.TradeNotification, error)
func InitAlipay ¶
func Notification ¶
func Refund ¶
func Refund(refund *TradeRefund) (interface{}, error)
Types ¶
type TradePay ¶
type TradeRefund ¶
type TradeRefund struct {
Platform Platform
TradeNo string //商户订单号
RefundNo string //商户退单号(aliapy可不传)
TotalAmount float64 //订单总金额(alipay可不传)
RefundAmount float64 //退款金额
RefundReason string //退款原因(选填)
}
func (*TradeRefund) ToAlipay ¶
func (refund *TradeRefund) ToAlipay() *alipay.AliPayTradeRefund
func (*TradeRefund) ToWxpay ¶
func (refund *TradeRefund) ToWxpay() wxpay.Params
Click to show internal directories.
Click to hide internal directories.