|
|
@@ -87,15 +87,16 @@ func (self *PayController) wxPayBalanceAsync() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
+ order := balance_model.GetBalanceOrderByOId(orderId, false)
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(order.Depart, true)
|
|
|
// 签名校验参数
|
|
|
- if !wx_mp.VerifyPayResult(params) {
|
|
|
+ if !wx_mp.VerifyPayResult(params, payCode) {
|
|
|
beego.BeeLogger.Error("VerifyPayResult not pass")
|
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
- order := balance_model.GetBalanceOrderByOId(orderId, false)
|
|
|
totalFee, _ := strconv.ParseInt(params.TotalFee, 10, 64)
|
|
|
//totalFee := int64(300000)
|
|
|
if order == nil {
|
|
|
@@ -295,16 +296,16 @@ func (self *PayController) wxPayExchangeAsync() {
|
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
+ order := order_model.GetOrderById(orderId, false)
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(order.Depart, true)
|
|
|
// 签名校验参数
|
|
|
- if !wx_mp.VerifyPayResult(params) && !wx_mp.VerifyGzhPayResult(params) {
|
|
|
+ if !wx_mp.VerifyPayResult(params, payCode) && !wx_mp.VerifyGzhPayResult(params, payCode) {
|
|
|
beego.BeeLogger.Error("VerifyPayResult not pass")
|
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
- order := order_model.GetOrderById(orderId, false)
|
|
|
totalFee, _ := strconv.ParseInt(params.TotalFee, 10, 64)
|
|
|
settlementTotalFee, _ := strconv.ParseInt(params.SettlementTotalFee, 10, 64)
|
|
|
beego.BeeLogger.Warn("after_pay_controller.wxPayExchangeAsync.settlementTotalFee(%d)", settlementTotalFee)
|
|
|
@@ -390,15 +391,16 @@ func (self *PayController) wxPayCashczAsync() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
+ order := balance_model.GetRechargeCashOrderByOId(orderId, false)
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(order.Id, true)
|
|
|
// 签名校验参数
|
|
|
- if !wx_mp.VerifyPayResult(params) {
|
|
|
+ if !wx_mp.VerifyPayResult(params, payCode) {
|
|
|
beego.BeeLogger.Error("wxPayCashczAsync.VerifyPayResult not pass")
|
|
|
self.Ctx.WriteString(wx_mp.MapToXmlString(notifyResponse))
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- orderId := strings.Split(params.OutTradeNO, "_")[0]
|
|
|
- order := balance_model.GetRechargeCashOrderByOId(orderId, false)
|
|
|
totalFee, _ := strconv.ParseInt(params.TotalFee, 10, 64)
|
|
|
if order == nil || order.TotalPrice != totalFee {
|
|
|
beego.BeeLogger.Error("wxPayCashczAsync.order err: %v", order)
|