Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The commerce1_payment doesn't set the state correctly from Commerce 1. As a result, the payment never gets the "completed" state and therefore doesn't trigger an update to the order balance.
I think a mapping between the Commerce 1 payment status and the Commerce 2 state is needed.
Comment | File | Size | Author |
---|---|---|---|
#11 | Screenshot_20230824_143241.png | 81.04 KB | afagioli |
#5 | Screenshot 2023-01-03 at 08.20.24.png | 147.05 KB | danharper |
Issue fork commerce_migrate-3280108
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
joekersMerge request added.
I don't know Commerce 1 very well so I'm not sure if there are any statuses that I've missed, or if the map would have better states, but the completed state fixes the issue described.
Comment #4
rossb89 CreditAttribution: rossb89 at ComputerMinds commentedI've just encountered this issue myself as well.
I went looking in the Drupal 7 codebase for commerce_payment and found these useful bits in commerce_payment.module
So I think for a standard commerce implementation in Drupal 7, those statuses you are catering for in the static_map in your plugin look to be the only three that need to be handled?
If someone had a more customised implementation then they could handle this in their own static_map in a customised commerce1_payment.yml migration.
Comment #5
danharper CreditAttribution: danharper at hrpr for FFW commentedI'm getting a similar issue and after applying the patch the order state is saying success but authorised is empty and so is completed. See screenshot.
I haven't got a custom migrate module I'm just using everything out of the box, fresh install with commerce modules installed
Comment #6
DamienMcKennaThis still needs work, am seeing the same problem.
Comment #7
DamienMcKennaComment #8
DamienMcKennaI wonder if this fails because the commerce_payment_method table does not have records added? I started an issue to cover that table: #3339270: Create commerce_payment_method records
Comment #9
DamienMcKennaI ran the migration plugin from #3339261: [META] Payment problems with Commerce 1 migration and the payments page now shows the payment(s) total as the "total paid" value and the "order balance" field now show $0. As it should be.
Comment #10
afagioliTwo machines: prod and dev
Same commerce release: 8.x-2.36
Having the issue on the prod
No such issue on the devel machine
Comment #11
afagioliComment #12
afagioliupdate: order with broken balance has a NULL value "total_paid" field.
Comment #13
afagioliIn my case, it turned out it was caused by a broken custom module.
With no error message displayed at payment submission, a "Headers already sent error" in the
/admin/reports/dblog
helped to find the way.