|
@@ -219,7 +219,17 @@ func (self *PayController) wxPayCashczAsync() {
|
|
|
|
|
|
|
|
orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
order := balance_model.GetRechargeCashOrderByOId(orderId, false)
|
|
order := balance_model.GetRechargeCashOrderByOId(orderId, false)
|
|
|
- payCode := sys_config.GetPayConfigByDepart(order.Id, true)
|
|
|
|
|
|
|
+ if order == nil {
|
|
|
|
|
+ beego.BeeLogger.Error("wxPayCashczAsync.order not found: %s", orderId)
|
|
|
|
|
+ self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ wxUser := user_model.GetWxUserById(order.WxUserId, true)
|
|
|
|
|
+ depart := int64(0)
|
|
|
|
|
+ if wxUser != nil {
|
|
|
|
|
+ depart = wxUser.Depart
|
|
|
|
|
+ }
|
|
|
|
|
+ payCode := sys_config.GetPayConfigByDepart(depart, true)
|
|
|
// 签名校验参数
|
|
// 签名校验参数
|
|
|
if !wx_mp.VerifyPayResult(params, payCode) {
|
|
if !wx_mp.VerifyPayResult(params, payCode) {
|
|
|
beego.BeeLogger.Error("wxPayCashczAsync.VerifyPayResult not pass")
|
|
beego.BeeLogger.Error("wxPayCashczAsync.VerifyPayResult not pass")
|
|
@@ -228,7 +238,7 @@ func (self *PayController) wxPayCashczAsync() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
totalFee, _ := strconv.ParseInt(params.TotalFee, 10, 64)
|
|
totalFee, _ := strconv.ParseInt(params.TotalFee, 10, 64)
|
|
|
- if order == nil || order.TotalPrice != totalFee {
|
|
|
|
|
|
|
+ if order.TotalPrice != totalFee {
|
|
|
beego.BeeLogger.Error("wxPayCashczAsync.order err: %v", order)
|
|
beego.BeeLogger.Error("wxPayCashczAsync.order err: %v", order)
|
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
return
|
|
return
|