Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add action required data to adyen process_payment response
IKarbowiakb4b33d847901
diff --git a/saleor/graphql/checkout/tests/test_checkout.py b/saleor/graphql/checkout/tests/test_checkout.pyindex 3055f0c0bf..e40610ad42 100644--- a/saleor/graphql/checkout/tests/test_checkout.py+++ b/saleor/graphql/checkout/tests/test_checkout.py@@ -1677,6 +1677,7 @@ MUTATION_CHECKOUT_COMPLETE = """message}confirmationNeeded+ confirmationData}}"""@@ -2061,6 +2062,18 @@ def test_checkout_complete_no_payment(ACTION_REQUIRED_GATEWAY_RESPONSE = GatewayResponse(is_success=True,action_required=True,+ action_required_data={+ "paymentData": "test",+ "paymentMethodType": "scheme",+ "url": "https://test.adyen.com/hpp/3d/validate.shtml",+ "data": {+ "MD": "md-test-data",+ "PaReq": "PaReq-test-data",+ "TermUrl": "http://127.0.0.1:3000/",+ },+ "method": "POST",+ "type": "redirect",+ },kind=TransactionKind.CAPTURE,amount=Decimal(3.0),currency="usd",@@ -2112,6 +2125,7 @@ def test_checkout_complete_confirmation_needed(data = content["data"]["checkoutComplete"]assert not data["errors"]assert data["confirmationNeeded"] is True+ assert data["confirmationData"]new_orders_count = Order.objects.count()assert new_orders_count == orders_countdiff --git a/saleor/payment/gateways/adyen/plugin.py b/saleor/payment/gateways/adyen/plugin.pyindex d509803604..67c7ac2152 100644--- a/saleor/payment/gateways/adyen/plugin.py+++ b/saleor/payment/gateways/adyen/plugin.py@@ -251,6 +251,7 @@ class AdyenGatewayPlugin(BasePlugin):transaction_id=result.message.get("pspReference", ""),error=result.message.get("refusalReason"),raw_response=result.message,+ action_required_data=result.message.get("action"),)@classmethod