I am doing test using example payment. I complete the order but the order stays in pending status, is this normal?
I used rules and I have 2 rules one on "Completing the checkout process"->change order state and another on "After saving a new payment transaction"->change order state I tried also with change order status but i am not able to have completed orders.
Were i am lost?
Thanks

Comments

rszrama’s picture

Status: Active » Closed (works as designed)

You're not lost. We don't provide any automated way out of the box to move an order to "Completed" because we don't want to assume that just because an order completes checkout and / or is paid for that it's "Done." However, if this is the way your site is going to work, you can easily add an additional checkout rule that does this or even just edit the existing one that updates it to Pending.

rfay’s picture

Title: Order never gets completed » Document order completion methodology
Status: Closed (works as designed) » Active
Issue tags: +Needs documentation

Well, would say this probably needs docs.

egarias’s picture

Ok, Thanks I did #1, but i agree that your clear and reasonable explanation should be in docs

rickmanelius’s picture

Hey Ryan and Randy

Here's the problem with adding an additional checkout rule. I wanted to make a new rule that would switch 'pending' orders placed with the 'example payment' option to 'completed' orders while allowing authorize.net and other orders to stay 'pending.'

However, these 2 pieces of data (order and payment transaction) are almost impossible to link together in Rules

If I try to use any of the trigger's on 'order' (update/save/delete), I can't access the payment transaction information directly... even if I try to load entities by reference. If I tty to use a trigger on payment transactions being saved, I can kinda load part of the order, but I can't update it.

I know this is part of a known issue (#1053850: Fix metadata-assertions for referenced entities.), but there might be a bigger issue at play. Ideally the order object already loads some of the payment information so that it can be at least used for data comparison at the condition level...

Anyway, I'm loving Rules and Drupal Commerce. I just need to get through some of these gotchas!

rszrama’s picture

Yep, it's another issue, but it's an interesting use case. We probably should have a condition to check the payment method used for the order during checkout. I'll get it added in.

roam2345’s picture

tracking this as there a few cases I could use this #4.

rszrama’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Closing this out as the "When an order is first paid in full" event has been in place to solve #4 for quite some time. Also, I added a quick documentation page at: http://www.drupalcommerce.org/user-guide/implementing-automated-order-wo...

Of course, as I was finishing that, I found the documentation Josh had already written under the checkout docs, but c'est la vie.