Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Unfortunately seems like despite all efforts made by Vipps to ensure conversion from Vipps App back to the website in order to finalise the order, some orders are stuck locked in draft state and never properly placed. Following issue was created to address this scenario - #3082993: Automatically place orders authorised on order balance
Proposed resolution
Move syncing logic from onReturn to commerce_order.place.pre_transition so the data is always synced when order is being placed, despite if it's happening via onReturn or in a programmatic manner.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#7 | 3082997-7.patch | 10.54 KB | eiriksm |
| |||
#7 | interdiff5-7.txt | 905 bytes | eiriksm |
#5 | interdiff-2-5.txt | 1.24 KB | zaporylie |
#5 | 3082997-5.patch | 10.42 KB | zaporylie |
| |||
#4 | interdiff2-4.txt | 850 bytes | eiriksm |
Comments
Comment #2
zaporylieFeedback most welcome.
Comment #3
eiriksmTested and works like designed!
The patch has some coding standard issues, but so do the rest of the module, so let's not get caught up in that :)
Comment #4
eiriksmOur tests uncovered a bug in this, namely that you can cause an EntityStorageException if you try to query for remote id without it being set.
Updated patch attached.
Comment #5
zaporylie#4 is definitely valid. I updated the patch - only orders paid with vipps_express payment gateway can be subject of further processing.
Comment #6
eiriksmTested (in production as well) and works great.
Comment #7
eiriksmCame across another issue. If the order in question does not have a payment, we will end up calling getPlugin on NULL, which is totally not cool.
Comment #8
zaporylieGood catch! I'd like to merge in #7 and we can take all uncovered bugs in the follow up issues. Do you agree?
Comment #9
eiriksmAgreed. We have been using this in production for a while already ;)
Comment #11
zaporylieCommitted and pushed to 8.x-4.x. Thanks!