solidus_stripe
solidus_stripe copied to clipboard
Handle order merging behaviors
Solidus allows merging orders during checkout. Eg:
- user opens the website on their mobile device
- user logs in
- user adds items to a new order
- user does not complete the order
- user switches to their laptop
- user adds other items to a new order as a guest
- user logs in
- the two orders get merged
In the above scenario, one of the two orders might have some information about Stripe, like a Stripe Setup intent attached to it. Based on that, we must ensure the user can complete the order correctly after the merge. Even if we request to re-add their card information, it is acceptable, but there should not be any errors.
It's very likely that we don't have to do anything but add one or more specs to be sure that everything works as expected.