From d13d1104d7df872505a275bb1ca14e3baad17340 Mon Sep 17 00:00:00 2001 From: earlinn Date: Thu, 11 Jan 2024 15:59:47 +0600 Subject: [PATCH] Change stripe checkout session success_url and cancel_url --- .github/workflows/good_food_workflow.yaml | 2 +- backend/api/orders_views.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/good_food_workflow.yaml b/.github/workflows/good_food_workflow.yaml index d192668..14726b1 100644 --- a/.github/workflows/good_food_workflow.yaml +++ b/.github/workflows/good_food_workflow.yaml @@ -60,7 +60,7 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest needs: flake8_and_tests - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/backend/api/orders_views.py b/backend/api/orders_views.py index 5c37152..6ca7dce 100644 --- a/backend/api/orders_views.py +++ b/backend/api/orders_views.py @@ -559,8 +559,9 @@ def pay(self, request, *args, **kwargs): } ], success_url=domain_url - + "payment-results?session_id={CHECKOUT_SESSION_ID}", - cancel_url=domain_url + "cart", + + "payment-is-processing?session_id={CHECKOUT_SESSION_ID}", + cancel_url=domain_url + + "payment-cancelled?session_id={CHECKOUT_SESSION_ID}", client_reference_id=request.user.username if request.user.is_authenticated else None,