Skip to content
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

OrderMerger not restarting the checkout flow #3612

Open
cedum opened this issue May 8, 2020 · 1 comment
Open

OrderMerger not restarting the checkout flow #3612

cedum opened this issue May 8, 2020 · 1 comment
Labels
type:bug Error, flaw or fault

Comments

@cedum
Copy link
Contributor

cedum commented May 8, 2020

When performing a checkout as a guest user, then signing in at the confirm step, the guest payment source ownership isn't updated for the newly authenticated user, hence leaves the order in an inconsistent state: order in confirm state (associated to a user) having a payment with a payment source w/o an associated user.

Solidus Version:
reproduced on v2.9.2 and master.

To Reproduce

  • as a guest user, follow the checkout steps til confirm step;
  • at "confirm" step log in (ensure the logged in user doesn't have an active cart);
  • go back to /checkout/confirm and confirm the order;
  • an exception should be raised: Validation failed: Payment source does not belong to the user associated with the order;
  • and the order remains in an inconsistent state: state: 'completed', completed_at: nil (there're some other data inconsistencies I think, I didn't dig them all).

Expected behavior
There might be two ways to solve this when merging:

  1. restart the checkout flow ensuring there's no way to go back to confirm step and confirm the order;
  2. assign all dependencies to the authenticated user, ensuring the merged order is always in a valid state after merge.
@kennyadsl
Copy link
Member

Hey @cedum, restarting the checkout flow when the order is merged looks like a good trade-off IMO.

@waiting-for-dev waiting-for-dev added the type:bug Error, flaw or fault label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

No branches or pull requests

3 participants