Laurent 2 years ago
parent 4d1d6658dc
commit fc4775830d
  1. 10
      subscriptions/views.py

@ -26,18 +26,18 @@ def app_store_webhook(request):
signedPayload = fulljson['signedPayload'] signedPayload = fulljson['signedPayload']
KEY_FILE = settings.ASS_KEY_FILE #KEY_FILE = settings.ASS_KEY_FILE
with open(KEY_FILE,'r') as key_file: #with open(KEY_FILE,'r') as key_file:
key = ''.join(key_file.readlines()) # key = ''.join(key_file.readlines())
decodedPayload = jwt.decode(signedPayload, key, algorithms=['ES256']) #decodedPayload = jwt.decode(signedPayload, key, algorithms=['ES256'])
#print('hell yeah!' + str(key)) #print('hell yeah!' + str(key))
#logger.debug('test getLogger' + str(key)) #logger.debug('test getLogger' + str(key))
notification = ASSNotification( notification = ASSNotification(
content=decodedPayload, content=signedPayload,
) )
notification.save() notification.save()

Loading…
Cancel
Save