Documentation ¶
Index ¶
- type AliConf
- type AliPayTool
- func (p *AliPayTool) AlipayNotify(req *http.Request)
- func (p *AliPayTool) QueryRefund(orderNo, refundNo string) (*alipay.TradeFastpayRefundQueryResponse, error)
- func (p *AliPayTool) Refund(bm gopay.BodyMap) *alipay.TradeRefundResponse
- func (p *AliPayTool) TradeCreate(ctx context.Context, openId string, payNo string, payAmount string, ...) (*alipay.TradeCreateResponse, error)
- func (p *AliPayTool) TradeQuery(orderNo string) *alipay.TradeQueryResponse
- type WxConf
- type WxPayTool
- func (p *WxPayTool) Notify(req *http.Request) (error, *wechat.V3DecryptBusifavorResult)
- func (p *WxPayTool) WxJsPay(ctx context.Context, openId string, total int64, tradeNo string, ...) (*wechat.PrepayRsp, error)
- func (p *WxPayTool) WxQueryRefund(refundNo string) (*wechat.RefundQueryRsp, error)
- func (p *WxPayTool) WxRefund(ctx context.Context, refund int64, total int64, transactionId string, ...) (*wechat.RefundRsp, string)
- func (p *WxPayTool) WxTestV3Query(no string) *wechat.QueryOrderRsp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliConf ¶
type AliConf struct { AppId string `json:"app_id,optional"` PrivateKey string `json:"private_key,optional"` PublicKey string `json:"public_key,optional"` IsProd bool `json:"is_prod,optional"` NotifyUrl string `json:"notifyUrl,optional"` }
AliConf 微信支付配置
type AliPayTool ¶
func NewAliPyTool ¶
func NewAliPyTool(conf AliConf) *AliPayTool
func (*AliPayTool) AlipayNotify ¶
func (p *AliPayTool) AlipayNotify(req *http.Request)
func (*AliPayTool) QueryRefund ¶
func (p *AliPayTool) QueryRefund(orderNo, refundNo string) (*alipay.TradeFastpayRefundQueryResponse, error)
QueryRefund 查询退款接口
func (*AliPayTool) Refund ¶
func (p *AliPayTool) Refund(bm gopay.BodyMap) *alipay.TradeRefundResponse
Refund 退款接口
func (*AliPayTool) TradeCreate ¶
func (p *AliPayTool) TradeCreate(ctx context.Context, openId string, payNo string, payAmount string, description string) (*alipay.TradeCreateResponse, error)
TradeCreate 统一收单交易创建接口
func (*AliPayTool) TradeQuery ¶
func (p *AliPayTool) TradeQuery(orderNo string) *alipay.TradeQueryResponse
TradeQuery 交易查询接口
type WxConf ¶
type WxConf struct { AppMiniId string `json:"appMiniId,optional"` //小程序 APPID //AppId string `json:"appId,optional"` //公众号 APPID //APPId string `json:"AppId,optional"` //APP APPID MchId string `json:"mchId,optional"` //微信商户id SerialNo string `json:"serialNo,optional"` //商户证书的证书序列号 ApiV3Key string `json:"apiV3Key,optional"` //apiV3Key,商户平台获取 PrivateKey string `json:"privateKey,optional"` //privateKey:私钥 apiclient_key.pem 读取后的内容 AppSecret string `json:"appSecret,optional"` NotifyUrl string `json:"notifyUrl,optional"` //支付通知回调服务端地址 }
WxConf 微信支付配置
type WxPayTool ¶
type WxPayTool struct { Conf WxConf Client *wechat.ClientV3 }
func NewWxPayTool ¶
func (*WxPayTool) WxJsPay ¶
func (p *WxPayTool) WxJsPay(ctx context.Context, openId string, total int64, tradeNo string, description string) (*wechat.PrepayRsp, error)
WxJsPay 支付,在微信支付服务后台生成预支付交易单
func (*WxPayTool) WxQueryRefund ¶
WxQueryRefund 查询退款状态
func (*WxPayTool) WxRefund ¶
func (p *WxPayTool) WxRefund(ctx context.Context, refund int64, total int64, transactionId string, refundNo string, reason string) (*wechat.RefundRsp, string)
WxRefund 退款
func (*WxPayTool) WxTestV3Query ¶
WxTestV3Query 交易查询
Click to show internal directories.
Click to hide internal directories.