Versions in this module Expand all Collapse all v1 v1.0.2 Mar 5, 2021 v1.0.1 Jul 2, 2020 Changes in this version + type AppPayConfig struct + AppID string + NonceStr string + Package string + PartnerID string + PrePayID string + Sign string + Timestamp string + type MchTransfersParams struct + Amount int + CheckName string + Desc string + MchAppID string + MchID string + NonceStr string + OpenID string + PartnerTradeNo string + ReUserName string + Sign string + SpbillCreateIp string + type NotifyResult struct + Appid string + Attach string + BankType string + CashFee string + CashFeeType string + CouponCount string + CouponFee string + DeviceInfo string + ErrCode string + ErrCodeDes string + FeeType string + IsSubscribe string + MchID string + NonceStr string + Openid string + OutTradeNo string + ResultCode string + ReturnCode string + ReturnMsg string + SettlementTotalFee string + Sign string + SignType string + TimeEnd string + TotalFee string + TradeType string + TransactionId string + type NotifyReturn struct + ReturnCode string + ReturnMsg string + type Params struct + ActName string + Body string + CreateIP string + OpenID string + OutTradeNo string + Remark string + SceneID string + SendName string + TotalFee int + TradeType string + Wishing string + type Pay struct + func NewPay(ctx *context.Context) *Pay + func (pcf *Pay) AppPayParams(prePayID string) AppPayConfig + func (pcf *Pay) JSPayParams(prePayID string) PayConfig + func (pcf *Pay) MchPay(p *Params) error + func (pcf *Pay) PrePayId(p *Params) (prePayID string, err error) + func (pcf *Pay) PrePayIdByApp(p *Params) (prePayID string, err error) + func (pcf *Pay) PrePayIdByJs(p *Params) (prePayID string, err error) + func (pcf *Pay) PrePayOrder(p *Params) (payOrder PreOrder, err error) + func (pcf *Pay) PrePayOrderByApp(p *Params) (payOrder PreOrder, err error) + func (pcf *Pay) PrePayOrderByJs(p *Params) (payOrder PreOrder, err error) + func (pcf *Pay) Refund(p *RefundParams) error + func (pcf *Pay) SendRed(p *Params) error + func (pcf *Pay) Sign(variable interface{}, key string) (sign string, err error) + type PayConfig struct + AppID string + NonceStr string + Package string + PaySign string + SignType string + TimeStamp string + type PreOrder struct + AppID string + CodeURL string + ErrCode string + ErrCodeDes string + MchID string + NonceStr string + PrePayID string + ResultCode string + ReturnCode string + ReturnMsg string + Sign string + TradeType string + type RedParams struct + ActName string + ClientIP string + ConsumeMchID string + MchBillno string + MchID string + NonceStr string + ReOpenID string + Remark string + RiskInfo string + SceneID string + SendName string + Sign string + TotalAmount int + TotalNum int + Wishing string + WxAppID string + type RedResult struct + ErrCode string + ErrCodeDes string + MchBillno string + MchID string + ReOpenID string + ResultCode string + ReturnCode string + ReturnMsg string + SendListid string + TotalAmount int + WxAppID string + type RefundParams struct + CreateIP string + OutRefundNo string + OutTradeNo *string + RefundFee int + TotalFee int + TransactionID *string + type RefundResult struct + AppID string + CashFee int + CashFeeType string + CashRefundFee int + ErrCode string + ErrCodeDes string + FeeType string + MchID string + NonceStr string + OutRefundNo string + OutTradeNo string + RefundFee int + RefundID string + ResultCode string + ReturnCode string + ReturnMsg string + SettlementRefundFee int + SettlementTotalFee int + Sign string + TotalFee int + TransactionID string + type SignStruct struct + Elements map[string]string + Keys []string + Tag string + ToLower bool + func (this SignStruct) Sign(variable interface{}, fn func() hash.Hash, apiKey string) (sign string, err error) + type WxRefundParams struct + AppID string + MchID string + NonceStr string + NotifyUrl *string + OutRefundNo string + OutTradeNo *string + RefundAccount *string + RefundDesc *string + RefundFee int + RefundFeeType *string + Sign string + SignType *string + TotalFee int + TransactionID *string