Laurent 2 years ago
parent 43846efb0e
commit 427e9e6860
  1. 28
      subscriptions/views.py

@ -29,27 +29,17 @@ def app_store_webhook(request):
#fulljson = json.loads(data) #fulljson = json.loads(data)
# signedPayload = fulljson['signedPayload'] # signedPayload = fulljson['signedPayload']
decoded_payload = json.loads(base64.b64decode(decoded)) try:
data = asn2.parse(decoded)
type = data['notificationType']
# Now you can access the decoded data notification = ASSNotification(
type = decoded_payload.get('notification_type') content=type,
notification = ASSNotification( )
content=type, notification.save()
)
notification.save()
except InvalidTokenError:
# try: pass
# data = asn2.parse(request.body)
# type = data['notificationType']
#
# notification = ASSNotification(
# content=type,
# )
# notification.save()
#
# except InvalidTokenError:
# pass
# KEY_FILE = settings.ASS_KEY_FILE # KEY_FILE = settings.ASS_KEY_FILE
# #

Loading…
Cancel
Save