|
@@ -297,11 +297,12 @@ class InAppPurchaseView(View):
|
|
|
|
|
|
@staticmethod
|
|
|
def app_store_server_notifications(request):
|
|
|
- logger = logging.getLogger('apple_pay')
|
|
|
- logger.info('App Store服务器通知参数:{}'.format(request.POST))
|
|
|
- if request.method == 'POST':
|
|
|
- try:
|
|
|
+ try:
|
|
|
+ logger = logging.getLogger('apple_pay')
|
|
|
+ logger.info('App Store服务器通知参数:{}'.format(request.POST))
|
|
|
+ if request.method == 'POST':
|
|
|
payload = json.loads(request.body.decode('utf-8'))
|
|
|
+ LOGGER.info('App Store服务器通知payload:{}'.format(payload))
|
|
|
# 获取 signedPayload
|
|
|
signed_payload = payload.get('signedPayload')
|
|
|
if not signed_payload:
|
|
@@ -335,7 +336,7 @@ class InAppPurchaseView(View):
|
|
|
|
|
|
return HttpResponse(status=200)
|
|
|
|
|
|
- except Exception as e:
|
|
|
- LOGGER.info('App Store服务器通知异常:{}'.
|
|
|
- format('error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e))))
|
|
|
- return HttpResponse(status=500)
|
|
|
+ except Exception as e:
|
|
|
+ LOGGER.info('App Store服务器通知异常:{}'.
|
|
|
+ format('error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e))))
|
|
|
+ return HttpResponse(status=500)
|