Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Make payment_token as required

jxltom0f45ec6e2c9d
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.py
index 55821d6e53..839245bebe 100644
--- a/saleor/graphql/payment/mutations.py
+++ b/saleor/graphql/payment/mutations.py
@@ -118,6 +118,7 @@ class PaymentAuthorize(BaseMutation):
class Arguments:
payment_id = graphene.ID(required=True, description='Payment ID')
payment_token = graphene.String(
+ required=True,
description='One-time-use reference to payment information')
class Meta:
@@ -175,6 +176,7 @@ class PaymentCharge(BaseMutation):
class Arguments:
payment_id = graphene.ID(required=True, description='Payment ID')
payment_token = graphene.String(
+ required=True,
description='One-time-use reference to payment information')
amount = Decimal(description='Transaction amount')
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 91ff4ad6d7..6c5fc8064e 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -857,9 +857,9 @@ type Mutations {
productVariantUpdate(id: ID!, input: ProductVariantInput!): ProductVariantUpdate
variantImageAssign(imageId: ID!, variantId: ID!): VariantImageAssign
variantImageUnassign(imageId: ID!, variantId: ID!): VariantImageUnassign
- paymentAuthorize(paymentId: ID!, paymentToken: String): PaymentAuthorize
+ paymentAuthorize(paymentId: ID!, paymentToken: String!): PaymentAuthorize
paymentCapture(amount: Decimal, paymentId: ID!): PaymentCapture
- paymentCharge(amount: Decimal, paymentId: ID!, paymentToken: String): PaymentCharge
+ paymentCharge(amount: Decimal, paymentId: ID!, paymentToken: String!): PaymentCharge
paymentRefund(amount: Decimal, paymentId: ID!): PaymentRefund
paymentVoid(paymentId: ID!): PaymentVoid
pageCreate(input: PageInput!): PageCreate