Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ghost "Pending orders"


dogpaw

Recommended Posts

Posted

One of my client's sites recently had a potential customer trying to make a purchase but her credit card got declined due to an incorrect zip code in the system with her credit card company. That's all good because the Auth.net processing/validation is working.

 

However, the customer was placed in the database table for "orders" three times because this person tried three times to complete her order. But since the card got declined all three times, there are three entries in the table "order." Then the first home page of the admin of the site shows "3" pending orders. There are no orders once you click on the pending link.

 

For now, I just went directly into the "orders" table and manually deleted the three ghost orders but my client would like to avoid that in the future since she would have to hire me to manually delete them again.

 

Where in the site code could I make a change to NOT enter declined orders in the database. Or is this something I need to post on the Payment Gateway forum section?

 

Thanks

Posted

Havent seen a contribution about it, but what you could do is to "expire" an order if it is not processed lets say within 24hrs. So say in application_top.php (or maybe when someone logins will be better) you could define a method to check for the orders table those with pending status.

 

You check the last_modified column of the orders table vs the current time. If there is a 24hrs difference say, you could simply remove the order entry. So even if the same customer logins the next day the order will be gone. Of course you could modify the time difference for your needs and make it 1 hour or something.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...