You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for writing this code. I would like to handle sandbox and production URL in same code. I don't know Python so wanted to check whether below code looks fine in views.py. Everything remains same.
I have added URL variables to handle this.
response = requests.post(settings.RECEIPT_VERIFICATION_URL_PRODUCTION, data=json.dumps(data))
payload = response.json()
status = payload["status"]
if status == 21007
response = requests.post(settings.RECEIPT_VERIFICATION_URL_SANDBOX, data=json.dumps(data))
payload = response.json()
response = JSONResponse(payload)
The text was updated successfully, but these errors were encountered:
Hi
Thanks for writing this code. I would like to handle sandbox and production URL in same code. I don't know Python so wanted to check whether below code looks fine in views.py. Everything remains same.
I have added URL variables to handle this.
response = requests.post(settings.RECEIPT_VERIFICATION_URL_PRODUCTION, data=json.dumps(data))
payload = response.json()
status = payload["status"]
if status == 21007
response = requests.post(settings.RECEIPT_VERIFICATION_URL_SANDBOX, data=json.dumps(data))
payload = response.json()
response = JSONResponse(payload)
The text was updated successfully, but these errors were encountered: