Vinayak Garg
Vinayak Garg

Reputation: 6616

How to "cancel" the order in case user aborts the transaction?

I am working on a Magento (ver. 1.6.1.0) site. There are 2 payment options : COD and Net Banking/Credit Card.

Whenever user proceeds to payment gateway (EBS for Net Banking, but solution must be same for other gateways) the Magento Dash (Sales > Orders) shows "Pending" as status. Now if the user closes the browser at the time of filling in card details, the status in Magento remains "pending", whereas it should now be "cancelled".

I guess I can setup a cron job, which after certain time, changes the status to "cancelled".

My Questions-

  1. Is there any way of doing it without cron?
  2. If cron, then some explanation of the procedure (I am new to cron). Like do I invoke cron after the user proceeds from my (merchant) site? If cron is invoked after 15 min, then how to handle transactions which were started (say) 1 sec ago?
  3. If user clicks back button on payment gateway site, the status is still "pending", how to "cancel" these orders?

EDIT: I designed this state diagram. Now I need to add a state as well. As pointed in comment, Cron should not "cancel" it, but change it to some state that staff can understand, and call up customer. Staff then decides the final state. So one more question : How to add state? [solved]
enter image description here

Please answer as many or as few parts of question, that you know.
Thank you.

Upvotes: 1

Views: 2218

Answers (2)

rrrcode
rrrcode

Reputation: 107

Here is a more updated approach:

If you are using community 7 and above you can set your own order statuses in the admin section by going to System > Order Statuses

Then change your status to be default status, it will now show when you go to order comments.

Upvotes: 0

Amanjot Singh
Amanjot Singh

Reputation: 11

I think this link will be able to help you..

http://www.magentocommerce.com/boards/viewthread/19427/

You can also check out the file mentioned in this link.. http://thinkclay.com/technology/magento-custom-status-in-admin

Upvotes: 1

Related Questions