-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicated tokens and tokens type mismatch #2926
Fix duplicated tokens and tokens type mismatch #2926
Conversation
@wjrosa, I'm making this back a draft for now. Gotta double-check the behavior with other APMs besides SEPA. |
Oh ok, I was testing it now (code is OK). I will wait for once it is ready again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @a-danae, thanks for all your work on this PR! Loving the look of those changes in the woocommerce_get_customer_upe_payment_tokens()
function.
I see this PR is still draft but I've been testing this PR and I can confirm the Bancontact, ideal, SEPA tokens are stored with stripe_{bancontact|ideal|sepa_debit}
gateway ID on this branch 👍 however, when I save an APM card on develop
i.e. with iDeal, the card is saved with gateway_id set to stripe
, then when I switch to this branch and navigate to the checkout page, I'm seeing the tokens duplicated still:
Thanks so much for reviewing this, @mattallan !
Mind checking it again, if you can? This should be solved by 52c9db4 The original approach of keeping the old tokens was meant to allow people to roll back if needed. I decided to remove them now because the old tokens would get re-created by this method if the merchants rolled back. But glad to go for a different approach! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @a-danae!! I've tested the latest changes and confirmed my previous issues have been fixed!
I almost don't want to ask this, but what's the expected behaviour when a merchant toggles between UPE and legacy checkout? 🙉
In my testing I'm seeing ideal/bancontact tokens get duplicated/converted into stripe_sepa
tokens when I turn off UPE and refresh the checkout page:
When I view the checkout page, it looks like ideal/bancontact doesn't list saved cards and doesn't allow saving cards anyway, so I actually think this is all working as intended, but I wanted to double-check with you. Enabling the UPE again all seems fine as well so I can't see any issues with this.
Approving this! 💯💃 Well done 👏
Biig thanks for checking this out again, @mattallan 🙌 Glad to hear the previous behavior is now working as expected 🎉
I certainly wouldn't expect them to be duplicated/converted. Great catch there btw! I'm getting a different behavior on my end, though. Mind sharing the replication steps for yours? This is what I see over here:
I'll create an issue for this, but it's different and less critical from what you're getting. I'll continue diving there. |
Fixes #2894
Changes proposed in this Pull Request:
$payment_method_instance
to match the type of the payment method we're processing.Testing instructions
Creating the tokens in an older version
develop
AT611904300234573201
and check off "Save payment information to my account for future purchases"Upgrading to 8.0.0
add/deferred-intent
Retrieving other APM tokens
changelog.txt
andreadme.txt
(or does not apply)Post merge