This is a weird Checkout + Payment UX problem. After adding their payment method information, the payment method gets tokenized and the user is on the review page. If the user goes back to edit this information, they cannot. They have to re-enter it completely.
We have SupportsUpdatingStoredPaymentMethodsInterface, but I don't recall if this allows editing in Checkout.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | commerce-authnet-allow-editing-billing-info.patch | 1.43 KB | lighttree |
| #28 | commerce-allow-edit-authorizenet-billing-info.patch | 1.03 KB | lighttree |
Comments
Comment #2
scottsawyerIf a customer ( anonymous ) enters a credit card and continues to the review screen, notices a mistake on the billing address, there is no way to go back and change just the address. Their only option is to add a new credit card. This could be confusing because the credit card number would be the same, just with a new billing address.


I also noticed that when I add a new card with a different address, the original card & address are no longer available.
I only tested with a Stripe test card number, not sure if that has any affect.
Comment #3
agiraud commented+1 for this
I noticed the same issue today, we should have a way to edit the billing information for existing payment method :(
Comment #4
quotientix commented+1
Comment #5
Rafael Cansinos+1
See the problem described in the image
Comment #6
ShenHua commentedI believe I'm experiencing the same bug:
- I am using 2 payment methods. PayPal (the first one), Klarna Checkout (the second choice).
Everything is fine with Klarna Checkout, so I believe this to be Commerce Paypal bug.
Order Information Step
1. Choose a saved address OR add a new one. It doesn't matter.
2. PayPal selected as Payment Method. (If I select Klarna, the bug does not happen.)
3. I click "Continue to review".
Review Step
4. At this stage, I click either "edit" where the address is or I click the "go back" button. Both bring same result.
5. Takes me back to Order Information...
Order Information Again, Step
6. PayPal Payment Method Selected.
7. The whole billing form is not rendered at all. There's nothing I can edit. I only see Payment Methods and then immediately Continue to Review button below.
...Of course, if I switch to Klarna Checkout at this (or any other for that matter) time, then the address there works fine.
If I switch back to PayPal. The billing address form is missing.
Now, this is worth noting.
This persists regardless if I remove something from the shopping cart, or try to go back and forth between Review and Order Information page. I just can't edit billing address of PayPal after it's first entered.
Now, if I then choose Klarna Checkout -> Continue to Review -> Edit -> Change Payment Method to PayPal instead of Klarna. Then all of a sudden, the billing address re-appears for PayPal too. Now I can edit it again.
Comment #7
rszrama commentedWe'll try using the remote_id field on payment methods to determine whether or not the profile is still editable. If it hasn't been tokenized yet (i.e. there is no remote_id), then it should still be editable.
Comment #8
jsacksick commentedThe underlying problem might be that a payment method is created too early. For example, when using PayPal Checkout that technically supports creating payment methods, selecting paypal in checkout before actually initiating the payment will create the payment method when the payment information pane is submitted.
Comment #9
tommychrisI think this is a major problem (or maybe Critical...).
Comment #10
jsacksick commentedOk, I gave this issue a closer look today. I have a fix that seems to work for PayPal. But not 100% sure if this is what's affecting other gateways as well.
We can't allow updating the billing profile for payment methods that have been tokenized.
The fix needs tests (Was thinking we could update
PaymentCheckoutTest::testCheckoutWithOffsiteRedirectPost()but for some reason, after the offsite redirect option is selected in checkout, when returning to the order information page, the newly created payment method isn't present in the options (that's a weird thing to investigate).Also, this fix wouldn't actually work for the
"example_offsite_redirect"test gateway plugin because it actually sets a remote ID.Granted we could either not set the remote ID, or wipe it prior to returning on the order info page.
Comment #12
tommychrisI tested your patch, and my results are (I have only one payment gateway installed, the PayPal (Sandbox)):
Thanks your existent work, I hope you can fix this without too much time & effort.
Comment #13
jsacksick commented@TommyChris: I kept trying to reproduce the behavior described and couldn't. My billing address is always updated. Tried with profile copying, without profile copying...
Comment #14
tommychris@jsacksick: I have no luck :(
I've just created a brand new empty D9 website, and I got the same as my live website. If you have a little time, you can look after it.
!!!removed account details!!!
It is a new D9.2.6 website + installed some of the commerce modules + field ui + admin toolbar. I made some default configuration for Commerce (created store, product type, ...).
Here is a demo product: https://d9.mcdev.hu/product/1
After that steps, you can that nothing changed. None of the profiles updated. If you try to add a new profile instead the edit, the results are the same.
In this demo website, no custom module or custom theme were installed. My composer.patches.json is:
If you need more informations, or you would like to get ftp access, or a dump of the demo site, feel free to contact me.
Comment #15
dwkitchen commentedFor me, this works as expected and I cannot reproduce @TommyChris's issue
Comment #16
jsacksick commentedTests aren't passing for some reason, so this needs additional work apparently.
Comment #17
jsacksick commentedAttached patch should address the test failures.
Comment #20
jsacksick commentedCommitted the patch from #17! Thanks everyone.
Comment #22
rhovlandTesting this out and it doesn't work for authorize.net. Have to enter a new payment method to change anything about the payment. Not sure if this is because of what you mentioned earlier, payment is being created too soon, or if this is caused by something else.
Comment #23
sunnykshah commentedI am having the same issue as TommyChris. Do anyone else face the same issue? Is there any solution to this?
Comment #24
kimberleycgmAs this issue is now closed I've raised a separate one for that issue as I ran into it too and think (hope!) I have a solution: https://www.drupal.org/project/commerce/issues/3281185
Comment #25
nojj commented@ TommyChris i have the same problem. Could your solve it?
Comment #26
jsacksick commented@TommyChris (and everyone else), could you test the patch from #3281185: Payment method profile overwrites order billing profile? It should fix the issue reported in comment #14.
Comment #27
tommychrisThanks @jsacksick, it looks like everything is ok now.
I upgraded the module to 8.30, and used only patch from #3281185-20.
Comment #28
lighttree commentedHi, I was dealing with the same issue as @rhovland mentioned with commerce_authnet. I've attached a couple small patches, one for commerce and one for commerce_authnet, that solve this problem. Essentially you just need to run updatePaymentMethod() when the payment is submitted and it will update the info on authorize.net. I hope this helps someone.
Comment #29
huijse commentedI do not see an edit button. Not sure why.. Do I need to configure something take in effect? I am using the latest version of commerce core 2.33
So besides the ability to add a new cards which is possible I do not see an edit next to the: Visa ending 4242

Comment #30
jsacksick commented@huijse: I think you misunderstood what this issue is fixing.
There's no support in checkout for updating existing payment methods.
This was about updating billing information attached to a payment method right after a payment method is added.
Comment #31
trickfun commentedSame issue here https://www.drupal.org/project/commerce/issues/3373306#comment-15866731
I think that editing should be directly in checkout because a large number simply close the browser window and never return if there isn't an edit button.
Thank you