Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Check for confirmation flag in checkout complete
Jakub Draganekccb0b13299b7
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex ad376a3485..ac9545c01e 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -683,6 +683,7 @@ type CheckoutClearPrivateMeta {type CheckoutComplete {errors: [Error!]order: Order+ confirmationNeeded: BooleancheckoutErrors: [CheckoutError!]}diff --git a/tests/api/test_checkout.py b/tests/api/test_checkout.pyindex 500bafbbff..abcc5ed9b0 100644--- a/tests/api/test_checkout.py+++ b/tests/api/test_checkout.py@@ -1158,6 +1158,7 @@ MUTATION_CHECKOUT_COMPLETE = """field,message}+ confirmationNeeded}}"""@@ -1412,6 +1413,7 @@ def test_checkout_complete_confirmation_needed(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]assert not data["errors"]+ assert data["confirmationNeeded"] is Truenew_orders_count = Order.objects.count()assert new_orders_count == orders_count@@ -1424,7 +1426,8 @@ def test_checkout_complete_confirmation_needed(response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["errors"]+ assert not dataconfirmationNeeded["errors"]+ assert not data["confirmationNeeded"]mock_get_manager.confirm_payment.assert_called_once()