Documentation
¶
Index ¶
- func ParseComplaintNotify(body []byte, apiv3Secret string) (model.ComplaintEvent, error)
- type WechatPay
- func (p *WechatPay) ComplaintResponse(ctx context.Context, response model.ComplaintResponse) error
- func (p *WechatPay) CompleteComplaint(ctx context.Context, complaintID string) error
- func (p *WechatPay) CreateComplaintNotification(ctx context.Context, notifyURL string) (err error)
- func (p *WechatPay) DeleteComplaintNotification(ctx context.Context) (err error)
- func (p *WechatPay) FundflowBill(ctx context.Context, date time.Time, accountType string) ([]byte, error)
- func (p *WechatPay) GetComplaint(ctx context.Context, complaintID string) (complaint model.Complaint, err error)
- func (p *WechatPay) GetComplaintNotification(ctx context.Context) (notifyURL string, err error)
- func (p *WechatPay) ListComplaints(ctx context.Context, begin, end time.Time) ([]model.Complaint, error)
- func (p *WechatPay) NegotiationHistorys(ctx context.Context, complaintID string) ([]model.NegotiationHistory, error)
- func (p *WechatPay) OrderQueryByOutTradeNo(ctx context.Context, outTradeNo string) (model.TradeQuery, error)
- func (p *WechatPay) OrderQueryByTransactions(ctx context.Context, transactionID string) (model.TradeQuery, error)
- func (p *WechatPay) ParseComplaintNotify(r *http.Request) (model.ComplaintEvent, error)
- func (p *WechatPay) RefundByOutTradeNo(ctx context.Context, outTradeNo string, amount int) (model.RefundsOrder, error)
- func (p *WechatPay) RefundByTransactions(ctx context.Context, transactionID string, amount int) (model.RefundsOrder, error)
- func (p *WechatPay) TradeBill(ctx context.Context, date time.Time, billType string) ([]byte, error)
- func (p *WechatPay) UpdateCertificates() error
- func (p *WechatPay) UpdateComplaintNotification(ctx context.Context, notifyURL string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseComplaintNotify ¶
func ParseComplaintNotify(body []byte, apiv3Secret string) (model.ComplaintEvent, error)
ParseComplaintNotify 解析投诉通知回调数据 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_16.shtml
Types ¶
type WechatPay ¶
type WechatPay struct {
NotifyURL string // 支付通知地址
Client *http.Client // http client
// contains filtered or unexported fields
}
WechatPay 微信支付SDK
func New ¶
func New(mchid string, apiv3Secret string, privateKey *rsa.PrivateKey, certificate *x509.Certificate) *WechatPay
New 创建微信支付模块
func (*WechatPay) ComplaintResponse ¶
ComplaintResponse 提交回复 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_14.shtml
func (*WechatPay) CompleteComplaint ¶
CompleteComplaint 反馈投诉单已处理完成 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_15.shtml
func (*WechatPay) CreateComplaintNotification ¶
ComplaintNotifications 创建投诉通知回调地址 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_2.shtml
func (*WechatPay) DeleteComplaintNotification ¶
GetComplaintNotification 查询投诉通知回调地址 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_5.shtml
func (*WechatPay) FundflowBill ¶
func (p *WechatPay) FundflowBill(ctx context.Context, date time.Time, accountType string) ([]byte, error)
FundflowBill 申请资金账单 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_7.shtml
func (*WechatPay) GetComplaint ¶
func (p *WechatPay) GetComplaint(ctx context.Context, complaintID string) (complaint model.Complaint, err error)
GetComplaint 查询投诉详情 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_13.shtml 最新更新时间:2021.04.01
func (*WechatPay) GetComplaintNotification ¶
GetComplaintNotification 查询投诉通知回调地址 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_3.shtml
func (*WechatPay) ListComplaints ¶
func (p *WechatPay) ListComplaints(ctx context.Context, begin, end time.Time) ([]model.Complaint, error)
ListComplaints 查询投诉单列表 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_11.shtml 最新更新时间:2021.04.01
func (*WechatPay) NegotiationHistorys ¶
func (p *WechatPay) NegotiationHistorys(ctx context.Context, complaintID string) ([]model.NegotiationHistory, error)
NegotiationHistorys 查询投诉协商历史 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_12.shtml 最新更新时间:2021.04.01
func (*WechatPay) OrderQueryByOutTradeNo ¶
func (p *WechatPay) OrderQueryByOutTradeNo(ctx context.Context, outTradeNo string) (model.TradeQuery, error)
OrderQueryByOutTradeNo 商户订单号查询 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*WechatPay) OrderQueryByTransactions ¶
func (p *WechatPay) OrderQueryByTransactions(ctx context.Context, transactionID string) (model.TradeQuery, error)
OrderQueryByTransactions 微信支付订单号查询 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*WechatPay) ParseComplaintNotify ¶
ParseComplaintNotify 解析投诉通知回调数据 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_16.shtml
func (*WechatPay) RefundByOutTradeNo ¶
func (p *WechatPay) RefundByOutTradeNo(ctx context.Context, outTradeNo string, amount int) (model.RefundsOrder, error)
RefundByOutTradeNo 商户订单号申请退款 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_9.shtml
func (*WechatPay) RefundByTransactions ¶
func (p *WechatPay) RefundByTransactions(ctx context.Context, transactionID string, amount int) (model.RefundsOrder, error)
RefundByTransactions 微信支付订单号申请退款 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_9.shtml
func (*WechatPay) TradeBill ¶
TradeBill 申请交易账单 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_6.shtml
func (*WechatPay) UpdateCertificates ¶
UpdateCertificates 更新商户当前可用的平台证书列表 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay5_1.shtml
func (*WechatPay) UpdateComplaintNotification ¶
ComplaintNotifications 创建投诉通知回调地址 文档链接: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_4.shtml