diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index eacd77b1..1e342d69 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-310.pyc and b/osinaweb/customercore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index 3fa632f8..be56c1d9 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -68,11 +68,10 @@ def initiate_checkout(request): print("Response Content:", response.content.decode()) # Print response content if response.status_code == 200: - response_data = response.text - parsed_data = dict(item.split("=") for item in response_data.split("&")) - session_id = parsed_data.get("session.id") - success_indicator = parsed_data.get("successIndicator") - return JsonResponse({"session_id": session_id, "success_indicator": success_indicator}) + res = response.json() + print(res) + + return JsonResponse({"session_id": res}) else: print("Response Status Code:", response.status_code) # Print status code return JsonResponse({"error": "Failed to initiate checkout"}, status=500)