|
|
@@ -151,16 +151,17 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
self.ReturnError(403, []string{apps.ProductStockNotEnough[0], fmt.Sprintf("%s商品库存不足", prdName)}, "", nil)
|
|
|
}
|
|
|
//beego.BeeLogger.Error("SaleNumsMap2 %v", SaleNumsMap)
|
|
|
-
|
|
|
+ order.AddressId = addressId
|
|
|
+ order.Remark = remark
|
|
|
+ order.Contact = concat
|
|
|
+ order.Tel = tel
|
|
|
+ order.Address = addr
|
|
|
+ order.TotalPrice = total_price
|
|
|
+ order.PickDept = pick_dept_id
|
|
|
+ order.PickWay = pick_way
|
|
|
//第一次支付已更新支付方式,第一次支付才计算支付金额
|
|
|
if len(order.PayWay) <= 0 {
|
|
|
- order.AddressId = addressId
|
|
|
- order.Remark = remark
|
|
|
order.PayWay = payWay
|
|
|
- order.Contact = concat
|
|
|
- order.Tel = tel
|
|
|
- order.Address = addr
|
|
|
- order.TotalPrice = total_price
|
|
|
//支付信息判断
|
|
|
//黑名单用户
|
|
|
curUser := user_model.GetUserById(wxUser.UserId, false)
|
|
|
@@ -194,8 +195,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
needWx = true
|
|
|
}
|
|
|
order.Freight = freight
|
|
|
- order.PickDept = pick_dept_id
|
|
|
- order.PickWay = pick_way
|
|
|
+
|
|
|
//先扣减提货券
|
|
|
if totalCoupon > 0 {
|
|
|
source := balance_model.BALANCE_SOURCE_EXCHANGE_PRODUCT
|
|
|
@@ -230,9 +230,6 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
//self.Data["json"] = self.FormatResult([]interface{}{result})
|
|
|
self.Data["json"] = result
|
|
|
case true: // 微信支付
|
|
|
- order.Contact = concat
|
|
|
- order.Tel = tel
|
|
|
- order.Address = addr
|
|
|
order.PaiedPrice = total_weixin
|
|
|
order.Source = source
|
|
|
order.Save()
|
|
|
@@ -298,6 +295,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
beego.BeeLogger.Error("pay way not match, payway:%s", payWay)
|
|
|
}
|
|
|
} else {
|
|
|
+ order.Save()
|
|
|
//如果是第二次支付
|
|
|
if source == order_model.SOURCE_XCX { //小程序微信支付
|
|
|
|