Skip to content

Commit b67453a

Browse files
committed
完善通知参数
1 parent c5db41a commit b67453a

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

notify.go

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ func (this *Client) GetTradeNotification(req *http.Request) (noti *TradeNotifica
9797
noti.Sign = req.FormValue("sign")
9898
noti.PassbackParams = req.FormValue("passback_params")
9999
noti.VoucherDetailList = req.FormValue("voucher_detail_list")
100+
noti.AgreementNo = req.FormValue("agreement_no")
101+
noti.ExternalAgreementNo = req.FormValue("external_agreement_no")
100102

101103
//if len(noti.NotifyId) == 0 {
102104
// return nil, errors.New("不是有效的 Notify")

notify_type.go

+34-32
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,38 @@ const (
66

77
// TradeNotification 通知响应参数 https://doc.open.alipay.com/docs/doc.htm?spm=a219a.7629140.0.0.8AmJwg&treeId=203&articleId=105286&docType=1
88
type TradeNotification struct {
9-
AuthAppId string `json:"auth_app_id"` // App Id
10-
NotifyTime string `json:"notify_time"` // 通知时间
11-
NotifyType string `json:"notify_type"` // 通知类型
12-
NotifyId string `json:"notify_id"` // 通知校验ID
13-
AppId string `json:"app_id"` // 开发者的app_id
14-
Charset string `json:"charset"` // 编码格式
15-
Version string `json:"version"` // 接口版本
16-
SignType string `json:"sign_type"` // 签名类型
17-
Sign string `json:"sign"` // 签名
18-
TradeNo string `json:"trade_no"` // 支付宝交易号
19-
OutTradeNo string `json:"out_trade_no"` // 商户订单号
20-
OutBizNo string `json:"out_biz_no"` // 商户业务号
21-
BuyerId string `json:"buyer_id"` // 买家支付宝用户号
22-
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
23-
SellerId string `json:"seller_id"` // 卖家支付宝用户号
24-
SellerEmail string `json:"seller_email"` // 卖家支付宝账号
25-
TradeStatus TradeStatus `json:"trade_status"` // 交易状态
26-
TotalAmount string `json:"total_amount"` // 订单金额
27-
ReceiptAmount string `json:"receipt_amount"` // 实收金额
28-
InvoiceAmount string `json:"invoice_amount"` // 开票金额
29-
BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额
30-
PointAmount string `json:"point_amount"` // 集分宝金额
31-
RefundFee string `json:"refund_fee"` // 总退款金额
32-
Subject string `json:"subject"` // 总退款金额
33-
Body string `json:"body"` // 商品描述
34-
GmtCreate string `json:"gmt_create"` // 交易创建时间
35-
GmtPayment string `json:"gmt_payment"` // 交易付款时间
36-
GmtRefund string `json:"gmt_refund"` // 交易退款时间
37-
GmtClose string `json:"gmt_close"` // 交易结束时间
38-
FundBillList string `json:"fund_bill_list"` // 支付金额信息
39-
PassbackParams string `json:"passback_params"` // 回传参数
40-
VoucherDetailList string `json:"voucher_detail_list"` // 优惠券信息
9+
AuthAppId string `json:"auth_app_id"` // App Id
10+
NotifyTime string `json:"notify_time"` // 通知时间
11+
NotifyType string `json:"notify_type"` // 通知类型
12+
NotifyId string `json:"notify_id"` // 通知校验ID
13+
AppId string `json:"app_id"` // 开发者的app_id
14+
Charset string `json:"charset"` // 编码格式
15+
Version string `json:"version"` // 接口版本
16+
SignType string `json:"sign_type"` // 签名类型
17+
Sign string `json:"sign"` // 签名
18+
TradeNo string `json:"trade_no"` // 支付宝交易号
19+
OutTradeNo string `json:"out_trade_no"` // 商户订单号
20+
OutBizNo string `json:"out_biz_no"` // 商户业务号
21+
BuyerId string `json:"buyer_id"` // 买家支付宝用户号
22+
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
23+
SellerId string `json:"seller_id"` // 卖家支付宝用户号
24+
SellerEmail string `json:"seller_email"` // 卖家支付宝账号
25+
TradeStatus TradeStatus `json:"trade_status"` // 交易状态
26+
TotalAmount string `json:"total_amount"` // 订单金额
27+
ReceiptAmount string `json:"receipt_amount"` // 实收金额
28+
InvoiceAmount string `json:"invoice_amount"` // 开票金额
29+
BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额
30+
PointAmount string `json:"point_amount"` // 集分宝金额
31+
RefundFee string `json:"refund_fee"` // 总退款金额
32+
Subject string `json:"subject"` // 总退款金额
33+
Body string `json:"body"` // 商品描述
34+
GmtCreate string `json:"gmt_create"` // 交易创建时间
35+
GmtPayment string `json:"gmt_payment"` // 交易付款时间
36+
GmtRefund string `json:"gmt_refund"` // 交易退款时间
37+
GmtClose string `json:"gmt_close"` // 交易结束时间
38+
FundBillList string `json:"fund_bill_list"` // 支付金额信息
39+
PassbackParams string `json:"passback_params"` // 回传参数
40+
VoucherDetailList string `json:"voucher_detail_list"` // 优惠券信息
41+
AgreementNo string `json:"agreement_no"` //支付宝签约号
42+
ExternalAgreementNo string `json:"external_agreement_no"` // 商户自定义签约号
4143
}

0 commit comments

Comments
 (0)