From 2db723f12dccdc9ec4c57bf7a7e29a2eaf2ab6bd Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Fri, 26 Jul 2024 17:58:28 +0530 Subject: [PATCH] debugging coupon on stripe 2 --- manage_subscriptions/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manage_subscriptions/views.py b/manage_subscriptions/views.py index 1c21774..0d6e59f 100644 --- a/manage_subscriptions/views.py +++ b/manage_subscriptions/views.py @@ -473,6 +473,7 @@ def create_checkout_session(request): print("data: ", data) subscription_id = data.get("subscriptionId", None) coupon_code = data.get("couponCode", None) + print("Initialize coupon_code: ", coupon_code) principal_id = request.user.id try: @@ -508,6 +509,7 @@ def create_checkout_session(request): ) except Coupon.DoesNotExist: return JsonResponse({"error": "Coupon not found."}, status=404) + print("after coupon try block: ", coupon) # Create a Transaction object with status INITIATE transaction = Transaction.objects.create( principal=request.user,