adyen-shopware6 icon indicating copy to clipboard operation
adyen-shopware6 copied to clipboard

[PW-6019] Add option to easily provide `additionalData.RequestedTestAcquirerResponseCode` to test payment errors

Open AndreasA opened this issue 3 years ago • 4 comments

Describe the bug In order to test all possible payment errors, it is possible to be able to specify additionalData.RequestedTestAcquirerResponseCode in the \Adyen\Shopware\Handlers\AbstractPaymentMethodHandler::preparePaymentsRequest method.

According to documentation: https://docs.adyen.com/development-resources/test-cards/result-code-testing/adyen-response-codes

Best would be to add the information somehow with the payment-details request or maybe automatically convert the holder name to the correct value that way it can be entered in the credit card form.

It cannot be set currently that way because all additional data is overridden here: https://github.com/Adyen/adyen-shopware6/blob/develop/src/Service/PaymentStateDataService.php#L82 and in the php api library the CheckoutStateDataValidator removes it, if not set after calling it: https://github.com/Adyen/adyen-php-api-library/blob/develop/src/Adyen/Service/Validator/CheckoutStateDataValidator.php

I tried the card holder option. However, not all error codes seem to provide the correct refusal code with the holder name. a lot just result in FRAUD instead of the corresponding refusal code but e.g. differentiating between refused and ERROR works with the holder name too.

AndreasA avatar Sep 14 '21 13:09 AndreasA

@peterojo Will this also be part of the fix for https://github.com/Adyen/adyen-shopware6/issues/209 https://github.com/Adyen/adyen-shopware6/pull/236

or at least part of that release?

AndreasA avatar Mar 09 '22 16:03 AndreasA

@AndreasA no it will not

peterojo avatar Mar 10 '22 10:03 peterojo

@AndreasA no it will not

Thanks for letting me know. This one isn't that important anyway. Way more important is the one that provides the reason code in the store api 😄

AndreasA avatar Mar 10 '22 11:03 AndreasA

can probably be fixed (for headless) by removing the checkoutstatevalidator which should not be used anymore anyway according to https://github.com/Adyen/adyen-php-api-library/issues/531#issuecomment-1735749828 and https://github.com/Adyen/adyen-php-api-library/issues/536#issuecomment-1735747796

AndreasA avatar Sep 26 '23 18:09 AndreasA