diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index 6d7a150e..4638a8ab 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 bfd60fdc..87788cf1 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -68,11 +68,9 @@ 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}) + response_data = response.json() + session_id = response_data.get("session.id") + return JsonResponse({"session_id": session_id}) else: print("Response Status Code:", response.status_code) # Print status code return JsonResponse({"error": "Failed to initiate checkout"}, status=500)