Documentation ¶
Index ¶
- type Alipay
- func (that *Alipay) CloseOrder(orderID string) (*alipay.TradeCloseResponse, error)
- func (that *Alipay) DownloadBill(billDate string) (*alipay.DataBillDownloadUrlQueryResponse, error)
- func (that *Alipay) Notify(request *http.Request) (gopay.BodyMap, error)
- func (that *Alipay) Pay(title, orderID, amount string) (*alipay.TradePrecreateResponse, error)
- func (that *Alipay) QueryOrder(orderID string) (*alipay.TradeQueryResponse, error)
- func (that *Alipay) QueryRefund(orderID, refundID string) (*alipay.TradeFastpayRefundQueryResponse, error)
- func (that *Alipay) Refund(orderID, amount string) (*alipay.TradeRefundResponse, error)
- type AlipayConfig
- type WxConfig
- type WxPay
- func (that *WxPay) CloseOrder(orderID string) (*wechat.CloseOrderResponse, error)
- func (that *WxPay) DownloadBill(billDate string) (string, error)
- func (that *WxPay) Pay(title, orderID string, amount int64) (wxRsp *wechat.UnifiedOrderResponse, err error)
- func (that *WxPay) PayNotify(req *http.Request) (gopay.BodyMap, error)
- func (that *WxPay) QueryOrder(orderID string) (gopay.BodyMap, error)
- func (that *WxPay) QueryRefund(refundOrderID string) (gopay.BodyMap, error)
- func (that *WxPay) Refund(orderID, refundOrderID string, totalAmount, amount int64) (gopay.BodyMap, error)
- func (that *WxPay) RefundNotify(req *http.Request) (gopay.BodyMap, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alipay ¶
type Alipay struct { Client *alipay.Client Config AlipayConfig }
Alipay 支付宝对象结构体
func (*Alipay) CloseOrder ¶
func (that *Alipay) CloseOrder(orderID string) (*alipay.TradeCloseResponse, error)
CloseOrder 关闭订单
func (*Alipay) DownloadBill ¶
func (that *Alipay) DownloadBill(billDate string) (*alipay.DataBillDownloadUrlQueryResponse, error)
DownloadBill 下载对账单
func (*Alipay) Pay ¶
func (that *Alipay) Pay(title, orderID, amount string) (*alipay.TradePrecreateResponse, error)
Pay 发起支付宝支付
func (*Alipay) QueryOrder ¶
func (that *Alipay) QueryOrder(orderID string) (*alipay.TradeQueryResponse, error)
QueryOrder 查询订单
func (*Alipay) QueryRefund ¶
func (that *Alipay) QueryRefund(orderID, refundID string) (*alipay.TradeFastpayRefundQueryResponse, error)
QueryRefund 退款查询
type AlipayConfig ¶
type AlipayConfig struct { Appid string `json:"appid"` // 支付宝APPID AppPubKey string `json:"app_pub_key"` // 应用公钥 AppPrivateKey string `json:"app_private_key"` // 应用私钥 AlipayPubKey string `json:"alipay_pub_key"` // 支付宝公钥 ReturnURL string `json:"return_url"` // 用户支付后跳转到商户指定的地址 NotifyURL string `json:"notify_url"` // 通知地址 IsProd bool `json:"is_prod"` // 是否应用生产 }
AlipayConfig 支付宝配置
type WxConfig ¶
type WxConfig struct { Appid string `json:"appid"` // 商户APPID MchID string `json:"mchid"` // 商户ID APIKey string `json:"api_key"` // 用于解密支付/退款的回调参数 AppSecret string `json:"app_secret"` // appSecret P12FilePath string `json:"p12_file_content"` // 退款时需要的证书信息 NotifyURL string `json:"return_url"` // 支付通知地址 RefundNotifyURL string `json:"refund_notify_url"` // 退款通知地址 IsProd bool `json:"is_prod"` // 是否生产环境 }
WxConfig 微信支付配置
type WxPay ¶
WxPay 微信支付客户端结构体
func (*WxPay) CloseOrder ¶
func (that *WxPay) CloseOrder(orderID string) (*wechat.CloseOrderResponse, error)
CloseOrder 关闭订单
func (*WxPay) DownloadBill ¶
DownloadBill 下载对账单
func (*WxPay) Pay ¶
func (that *WxPay) Pay(title, orderID string, amount int64) (wxRsp *wechat.UnifiedOrderResponse, err error)
Pay 发起支付
func (*WxPay) QueryOrder ¶
QueryOrder 查询支付订单
func (*WxPay) QueryRefund ¶
QueryRefund 查询退款
Click to show internal directories.
Click to hide internal directories.