adyen-salesforce-commerce-cloud
adyen-salesforce-commerce-cloud copied to clipboard
Deleted payment methods come back after call to Adyen function
Describe the bug After successfully deleting a previously saved payment method (Credit Card) from the user interface in SFCC, Adyen will repopulate the deleted payment methods
To Reproduce Steps to reproduce the behavior:
- Delete one or more saved payment methods (Credit Card) from a logged-in user account
- Click 'Back to My Account' or visit any other route which adyen hooks into with the updateSavedCards() method (PaymentInstruments-SavePayment, Account-Show)
- Inspecting the customer object at the beginning of the updateSavedCards() method should show the customers wallet reflects the deleted payment instruments. After getOneClickPaymentMethods() is called and new payment instruments are created in updateSavedCards() you should see that any deleted credit cards have returned to the customers wallet
Expected behavior Deleted payment methods should not be recreated after their deletion
Screenshots
-
Starting from a state of 3 saved payment methods, delete all payments
-
After Deleting all payments, clicking “Back to My Account” shows no saved payment methods *the issue would also occur at this point if we weren't replacing the “Account-Show” route entirely in our controller, as adyen also updates all saved cards on the account-show route
-
Click Add New Payment Method and re-add the card ending in ‘1111’
-
Adyen’s savePayment method will prepend to the PaymentInstruments-SavePayment route and call the “updateSavedCards” function. If you capture the customer object at this moment, you’ll see that their wallet only contains the one pending payment method being added
-
The ‘updateSavedCards’ function deletes all existing saved cards and gets the ones to add via the ‘getOneClickPaymentMethods’ function. When you capture the state of it’s return value, you’ll see it contains all the cards previously removed.
-
Back in ‘updateSavedCards’ you’ll see the credit cards being added contain the ones that were previously removed in this case the one ending in 0007
Desktop (please complete the following information):
- OS: Windows 10
- Browser: chrome
- Version: SFRA 6.0.0, Adyen 21.2.0, SFCC 22.5
Hi @kyleruscigno,
Thanks for raising this issue and for elaborating on it to this extent. This behavior should be fixed and we'll be looking into this as soon as possible.
Kind Regards, Wouter Adyen
@wboereboom Any progress on this? We are having this issue as well
Hi @codyluth,
Unfortunately we have not had the opportunity to start developing a fix. I will update this ticket as soon as we get the capacity to start working on this.
Kind Regards, Wouter Adyen
Just an update on this thread:
We have not been able to reproduce this issue on v22.1.0 Please let me know if this issue persists for you on this version so we can continue our investigation.
Kind Regards, Wouter Adyen
@wboereboom Thanks for getting back to us. Our QA team re-tested and it seems we are still having this issue with our saved payment methods. We are on v22.1.1 of the Adyen cartridge. I would be happy to chat or assist in the investigation if needed.
@codyluth the issue is fixed here: https://github.com/Adyen/adyen-salesforce-commerce-cloud/pull/811
@lemonxtt Thanks Lemonxtt.
I figured out that was the issue last month while working on an unrelated issue we were having. I forgot to update this thread with the info I had found, but it seems I didn't need too.
I am glad it will be fixed for the next cartridge update!