Skip to content

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

Mark gateway_response deprecated (#17935)

Lukasz Ostrowskic54df414ac36
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c78cfc847..e94c149782 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -82,6 +82,8 @@ All notable, unreleased changes to this project will be documented in this file.
- Extend `AttributeEntityType` with `CATEGORY` and `COLLECTION`. You can now assign category and collection as a attribute reference.
- Attribute values now expose the `referencedObject`, allowing for easier access to the linked entity.
- You can now filter and search attribute choices using the new `where` and `search` fields on the `attribute.choices` query.
+- Deprecated `Transaction.gatewayResponse` field. Please migrate to Transaction API and Apps.
+
### Webhooks
- Transaction webhooks responsible for processing payments can now return payment method details`, which will be associated with the corresponding transaction. See [docs](https://docs.saleor.io/developer/extending/webhooks/synchronous-events/transaction#response-4) to learn more.
diff --git a/saleor/graphql/payment/types.py b/saleor/graphql/payment/types.py
index 7ad02cfc1c..0160600c34 100644
--- a/saleor/graphql/payment/types.py
+++ b/saleor/graphql/payment/types.py
@@ -62,7 +62,9 @@ class Transaction(ModelObjectType[models.Transaction]):
)
error = graphene.String(description="Error associated with transaction, if any.")
gateway_response = JSONString(
- required=True, description="Response returned by payment gateway."
+ deprecation_reason="This field is a part of a legacy Payments API. Please use apps instead.",
+ required=True,
+ description="Response returned by payment gateway.",
)
amount = graphene.Field(Money, description="Total amount of the transaction.")
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 1c886cc4fb..a2e3e79c80 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -11805,7 +11805,7 @@ type Transaction implements Node @doc(category: "Payments") {
error: String
"""Response returned by payment gateway."""
- gatewayResponse: JSONString!
+ gatewayResponse: JSONString! @deprecated(reason: "This field is a part of a legacy Payments API. Please use apps instead.")
"""Total amount of the transaction."""
amount: Money