|
@@ -15,7 +15,7 @@ from Object.AliSmsObject import AliSmsObject
|
|
|
from Object.RedisObject import RedisObject
|
|
|
from Service.CommonService import CommonService
|
|
|
|
|
|
-env = itunesiap.env.sandbox if CONFIG_INFO == CONFIG_TEST else itunesiap.env.production
|
|
|
+ENV = itunesiap.env.sandbox if CONFIG_INFO == CONFIG_TEST else itunesiap.env.production
|
|
|
|
|
|
|
|
|
class InAppPurchaseView(View):
|
|
@@ -77,8 +77,8 @@ class InAppPurchaseView(View):
|
|
|
return response.json(10033)
|
|
|
|
|
|
order_id = CommonService.createOrderID()
|
|
|
- verify_response = itunesiap.verify(receipt, env=env)
|
|
|
- LOGGER.info('苹果内购收据认证响应:{}'.format(verify_response.text))
|
|
|
+ verify_response = itunesiap.verify(receipt, env=ENV)
|
|
|
+ LOGGER.info('苹果内购收据认证响应:{}'.format(eval(verify_response)))
|
|
|
product_id = verify_response.receipt.in_app[0]['product_id']
|
|
|
|
|
|
pay_type = PAY_TYPE_IN_APP_PURCHASE
|