Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Payment captured/authorized but order does not move into complete state #28

Open
zecke opened this issue Dec 12, 2011 · 2 comments
Open

Comments

@zecke
Copy link

zecke commented Dec 12, 2011

0.) Prepare a product with one item on-hand, disable backorders
1.) Prepare two orders and move them to the payment page
2.) complete one order...

3.) complete the other order
3.1) The payment will be captured/authorized
3.2)
#need to force checkout to complete state
until @order.state == "complete"
if @order.next!
@order.update!

fails because backorders are disabled, payment is already captured though, no normal user feedback is provided...

@ipd
Copy link

ipd commented Apr 9, 2012

This is happening on our site, though it only started with the upgrade from Spree 0.7x to 1.0.3.

Paypal orders are making it through the pipeline, but some times are remaining in the 'delivery' step.

@zecke What is the connection between the code snippet you provided and backorders?

@zecke
Copy link
Author

zecke commented Apr 9, 2012

In case backorders are disabled the call to next!/update! will lead to an exception that is not handled by the paypal extension. The result is that the state at paypal and the local state do not match.

My local hack:
Allow backorders in the backend but not in the shop ui

Clean solution:
Re-order code, consider using a transaction. handle the exception

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants