|
@@ -381,7 +381,7 @@ class Pay(models.Model):
|
|
return instance
|
|
return instance
|
|
|
|
|
|
def _wechatUnifiedOrder(self, app, openid):
|
|
def _wechatUnifiedOrder(self, app, openid):
|
|
- wechatpay = WechatPay(app.authorizer_appid, app.agent_num, app.agent_key)
|
|
|
|
|
|
+ wechatpay = WechatPay(app)
|
|
wechatpay.unifiedOrder(self.no, self.precreate_amount, openid, self.profit_sharing)
|
|
wechatpay.unifiedOrder(self.no, self.precreate_amount, openid, self.profit_sharing)
|
|
data = wechatpay.getAppString()
|
|
data = wechatpay.getAppString()
|
|
return data
|
|
return data
|
|
@@ -435,7 +435,7 @@ class Order(models.Model):
|
|
checkRexponse = WeChatResponse(app.authorizer_appid, app.agent_num, app.agent_key)
|
|
checkRexponse = WeChatResponse(app.authorizer_appid, app.agent_num, app.agent_key)
|
|
total_fee = checkRexponse.orderquery(pay_no)
|
|
total_fee = checkRexponse.orderquery(pay_no)
|
|
if int(total_fee) == int(self.amount):
|
|
if int(total_fee) == int(self.amount):
|
|
- wechatpay = WechatPay(app.authorizer_appid, app.agent_num, app.agent_key)
|
|
|
|
|
|
+ wechatpay = WechatPay(app)
|
|
wechatpay.unifiedOrder(pay_no, self.amount, openid, self.pay.profit_sharing)
|
|
wechatpay.unifiedOrder(pay_no, self.amount, openid, self.pay.profit_sharing)
|
|
data = wechatpay.getAppString()
|
|
data = wechatpay.getAppString()
|
|
return data
|
|
return data
|