Documentation
¶
Index ¶
- func AckNotification(w http.ResponseWriter)
- func GetTradeNotification(req *http.Request) (noti *main.TradeNotification, err error)
- func NewRequest(method, url string, params url.Values) (*http.Request, error)
- func PagePay(returnUrl, notifyUrl, bizContent string) (results *url.URL, err error)
- func ParsePKCS1PrivateKey(data []byte) (key *rsa.PrivateKey, err error)
- func ParsePKCS1PublicKey(data []byte) (key *rsa.PublicKey, err error)
- func TradeFinish(OutTradeNo string, noti *main.TradeNotification) (err error)
- func TradeQuery(OutTradeNo string) (string, error)
- func VerifyPKCS1v15(src, sig, key []byte, hash crypto.Hash) error
- func VerifyPKCS1v15WithKey(src, sig []byte, key *rsa.PublicKey, hash crypto.Hash) error
- func VerifySign(data url.Values, key []byte) (ok bool, err error)
- type AlipayTradeQueryResponse
- type BizContent
- type QueryRep
- type TradeNotification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AckNotification ¶
func AckNotification(w http.ResponseWriter)
func GetTradeNotification ¶
func ParsePKCS1PrivateKey ¶
func ParsePKCS1PrivateKey(data []byte) (key *rsa.PrivateKey, err error)
func TradeFinish ¶
func TradeQuery ¶
func VerifyPKCS1v15WithKey ¶
Types ¶
type AlipayTradeQueryResponse ¶
type AlipayTradeQueryResponse struct { Code string `json:"code"` Msg string `json:"msg"` SubCode string `json:"sub_code"` SubMsg string `json:"sub_msg"` OutTradeNo string `json:"out_trade_no"` BuyerPayAmount string `json:"buyer_pay_amount"` InvoiceAmount string `json:"invoice_amount"` PointAmount string `json:"point_amount"` ReceiptAmount string `json:"receipt_amount"` }
type BizContent ¶
type QueryRep ¶
type QueryRep struct { Data AlipayTradeQueryResponse `json:"alipay_trade_query_response"` Sign string `json:"sign"` }
type TradeNotification ¶
type TradeNotification struct { AuthAppId string `json:"auth_app_id"` // App Id NotifyTime string `json:"notify_time"` // 通知时间 NotifyType string `json:"notify_type"` // 通知类型 NotifyId string `json:"notify_id"` // 通知校验ID AppId string `json:"app_id"` // 开发者的app_id Charset string `json:"charset"` // 编码格式 Version string `json:"version"` // 接口版本 SignType string `json:"sign_type"` // 签名类型 Sign string `json:"sign"` // 签名 TradeNo string `json:"trade_no"` // 支付宝交易号 OutTradeNo string `json:"out_trade_no"` // 商户订单号 OutBizNo string `json:"out_biz_no"` // 商户业务号 BuyerId string `json:"buyer_id"` // 买家支付宝用户号 BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号 SellerId string `json:"seller_id"` // 卖家支付宝用户号 SellerEmail string `json:"seller_email"` // 卖家支付宝账号 TradeStatus string `json:"trade_status"` // 交易状态 TotalAmount string `json:"total_amount"` // 订单金额 ReceiptAmount string `json:"receipt_amount"` // 实收金额 InvoiceAmount string `json:"invoice_amount"` // 开票金额 BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额 PointAmount string `json:"point_amount"` // 集分宝金额 RefundFee string `json:"refund_fee"` // 总退款金额 Subject string `json:"subject"` // 总退款金额 Body string `json:"body"` // 商品描述 GmtCreate string `json:"gmt_create"` // 交易创建时间 GmtPayment string `json:"gmt_payment"` // 交易付款时间 GmtRefund string `json:"gmt_refund"` // 交易退款时间 GmtClose string `json:"gmt_close"` // 交易结束时间 FundBillList string `json:"fund_bill_list"` // 支付金额信息 PassbackParams string `json:"passback_params"` // 回传参数 VoucherDetailList string `json:"voucher_detail_list"` // 优惠券信息 }
Click to show internal directories.
Click to hide internal directories.