Commit 1865083a authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_wechat_secure_payment: Allow custom base_url and make tests easier

  This is required for multiple sites support and allow us write unit tests and not create a 100 lines mock.
parent 7ddf9e0f
......@@ -122,6 +122,8 @@ class WechatService(XMLObject):
wechat_url = self.getLinkUrlString()
if self.getWechatMode() == "SANDBOX":
key = self.getSandboxKey()
elif self.getWechatMode() == "UNITTEST":
return {"result_code": 'SUCCESS', "code_url": 'weixin://wxpay/bizpayurl?pr=AAAAA'}
else:
key = self.getServiceApiKey()
nonce_str = self.generateRandomStr()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment