Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make confirmationNeeded flag mandatory in GraphQL
Jakub Draganekfc53bf2fe750
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.pyindex b85ad81504..91d2e3b40b 100644--- a/saleor/graphql/checkout/mutations.py+++ b/saleor/graphql/checkout/mutations.py@@ -656,7 +656,8 @@ class CheckoutShippingMethodUpdate(BaseMutation):class CheckoutComplete(BaseMutation):order = graphene.Field(Order, description="Placed order.")confirmation_needed = graphene.Boolean(- required=False,+ required=True,+ default_value=False,description=("Set to true if payment needs to be confirmed"" before checkout is complete."@@ -788,7 +789,7 @@ class CheckoutComplete(BaseMutation):checkout.delete()# return the success response with the newly created order data- return CheckoutComplete(order=order)+ return CheckoutComplete(order=order, confirmation_needed=False)return CheckoutComplete(order=None, confirmation_needed=True)diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex f52b697c4e..a353b56123 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -683,7 +683,7 @@ type CheckoutClearPrivateMeta {type CheckoutComplete {errors: [Error!]order: Order- confirmationNeeded: Boolean+ confirmationNeeded: Boolean!checkoutErrors: [CheckoutError!]}