diff --git a/app/services/thirdpay/api/api_res_data.go b/app/services/thirdpay/api/api_res_data.go index 0c39b38..e8ff44d 100644 --- a/app/services/thirdpay/api/api_res_data.go +++ b/app/services/thirdpay/api/api_res_data.go @@ -5,6 +5,7 @@ type OrdersResp struct { OrderType int `json:"order_type"` OutTradeNo string `json:"out_trade_no"` Amount int `json:"amount"` + PayerTotal int `json:"payer_total"` Desc string `json:"desc"` Status int `json:"status"` diff --git a/app/services/thirdpay/pay.go b/app/services/thirdpay/pay.go index 70efe63..111f67e 100644 --- a/app/services/thirdpay/pay.go +++ b/app/services/thirdpay/pay.go @@ -27,6 +27,7 @@ func NewOrdersResp(db *ordersmodel.Orders) *api.OrdersResp { Status: db.Status, OrderType: db.OrderType, Amount: db.Amount, + PayerTotal: db.PayerTotal, Desc: db.Desc, CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"), } diff --git a/app/services/thirdpay/thirdpay_notify/notify.go b/app/services/thirdpay/thirdpay_notify/notify.go index 5a69010..977f31a 100644 --- a/app/services/thirdpay/thirdpay_notify/notify.go +++ b/app/services/thirdpay/thirdpay_notify/notify.go @@ -151,6 +151,7 @@ func (o *OrderNotify) updateOrder() { return } o.order.Status = o.Status + o.order.PayerTotal = o.ActualAmount o.Code = services.OrderUpdate(o.order, "status") return }