|
|
@@ -177,7 +177,9 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
|
|
|
order.TotalPrice += freight
|
|
|
notifyUrl := fmt.Sprintf("%s/v1/pay/%s/async/%s", beego.AppConfig.String("ApiHost"), EXCHANGE_TARGET, pay_model.PAYWAY_WEIXINPAY)
|
|
|
body := fmt.Sprintf("FOHOW玖玖-购买商品")
|
|
|
- payData := wx_mp.GetPayData(wxUser.Openid, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP())
|
|
|
+ //获取paycode
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(wxUser.Depart, true)
|
|
|
+ payData := wx_mp.GetPayData(wxUser.Openid, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP(), payCode)
|
|
|
|
|
|
//返回数据
|
|
|
type PayData struct {
|
|
|
@@ -194,8 +196,8 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
|
|
|
if wxGzh == nil {
|
|
|
self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
}
|
|
|
- //payData := wx_mp.GetPayData(wxGzh.GzhOpenId, order.OrderId , order.TotalPrice, body,notifyUrl, self.Ctx.Input.IP())
|
|
|
- payData := wx_mp.GetGzhPayData(wxGzh.GzhOpenId, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP())
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(wxUser.Depart, true)
|
|
|
+ payData := wx_mp.GetPayData(wxGzh.GzhOpenId, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP(), payCode)
|
|
|
|
|
|
//返回数据
|
|
|
type PayData struct {
|
|
|
@@ -213,7 +215,8 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
|
|
|
|
|
|
notifyUrl := fmt.Sprintf("%s/v1/pay/%s/async/%s", beego.AppConfig.String("ApiHost"), EXCHANGE_TARGET, pay_model.PAYWAY_WEIXINPAY)
|
|
|
body := fmt.Sprintf("FOHOW玖玖-购买商品")
|
|
|
- payData := wx_mp.GetPayData(wxUser.Openid, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP())
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(wxUser.Depart, true)
|
|
|
+ payData := wx_mp.GetPayData(wxUser.Openid, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP(), payCode)
|
|
|
|
|
|
//返回数据
|
|
|
type PayData struct {
|
|
|
@@ -230,8 +233,10 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
|
|
|
if wxGzh == nil {
|
|
|
self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
}
|
|
|
+ payCode := pay_model.GetPayConfigByDepart(wxUser.Depart, true)
|
|
|
+
|
|
|
//payData := wx_mp.GetPayData(wxGzh.GzhOpenId, order.OrderId , order.TotalPrice, body,notifyUrl, self.Ctx.Input.IP())
|
|
|
- payData := wx_mp.GetGzhPayData(wxGzh.GzhOpenId, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP())
|
|
|
+ payData := wx_mp.GetPayData(wxGzh.GzhOpenId, order.OrderId, order.PaiedPrice, body, notifyUrl, self.Ctx.Input.IP(), payCode)
|
|
|
|
|
|
//返回数据
|
|
|
type PayData struct {
|