|
|
@@ -202,7 +202,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
order.Address = fmt.Sprintf("%s%s%s%s", address.Province, address.City, address.District, address.Address)
|
|
|
order.Source = source
|
|
|
order.Save()
|
|
|
- if order.Source == order_model.SOURCE_XCX { //小程序微信支付
|
|
|
+ if source == order_model.SOURCE_XCX { //小程序微信支付
|
|
|
freight := sys_config.GetFreight()
|
|
|
if order.TotalPrice >= sys_config.GetOrderLimit() {
|
|
|
freight = int64(0)
|
|
|
@@ -223,7 +223,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
}
|
|
|
self.Data["json"] = &PayData{NeedWx: true, PayData: payData}
|
|
|
|
|
|
- } else if order.Source == order_model.SOURCE_APP {
|
|
|
+ } else if source == order_model.SOURCE_APP {
|
|
|
freight := sys_config.GetFreight()
|
|
|
if order.TotalPrice >= sys_config.GetOrderLimit() {
|
|
|
freight = int64(0)
|
|
|
@@ -265,7 +265,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
}
|
|
|
} else {
|
|
|
//如果是第二次支付
|
|
|
- if order.Source == order_model.SOURCE_XCX { //小程序微信支付
|
|
|
+ if source == order_model.SOURCE_XCX { //小程序微信支付
|
|
|
|
|
|
notifyUrl := fmt.Sprintf("%s/v1/pay/%s/async/%s", beego.AppConfig.String("ApiHost"), EXCHANGE_TARGET, pay_model.PAYWAY_WEIXINPAY)
|
|
|
body := fmt.Sprintf("FOHOW玖玖-购买商品")
|
|
|
@@ -279,7 +279,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source,
|
|
|
}
|
|
|
self.Data["json"] = &PayData{NeedWx: true, PayData: payData}
|
|
|
|
|
|
- } else if order.Source == order_model.SOURCE_APP {
|
|
|
+ } else if source == order_model.SOURCE_APP {
|
|
|
notifyUrl := fmt.Sprintf("%s/v1/pay/%s/async/%s", beego.AppConfig.String("ApiHost"), EXCHANGE_TARGET, pay_model.PAYWAY_WEIXINPAY)
|
|
|
body := fmt.Sprintf("FOHOW玖玖-购买商品")
|
|
|
payCode := sys_config.GetPayConfigByDepart(wxUser.Depart, true)
|