Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order missing after paypal payment received


LBManiac

Recommended Posts

Something odd happened yesterday with an order.  Received a Paypal email saying payment received which had the usual info in it but no email from the store.

 

On checking the orders page there is no sign of the order so then checked the database in case its status had glitched out and there was no sign of the order there either.  The order numbers have continued on past the number that has disappeared but this is really unusual given that the payment was processed correctly.  

 

Normally if the customer goes to paypal and the shop does not receive payment confirmation the order will sit at "Awaiting Completion" but in this case the order has disappeared altogether following a sucessful payment.

 

Tried to check if there were any logs that would show more info but can't work out if there is any.  Have also emailed customer to ask if anything strange happened.  Looking through logs and times the only thing which stood out was the time that paypal sent the email was nearly identical to an admin login time but this might have been coincidental. 

 

Other orders have been coming through fine but there was something strange with a paypal email this morning it had added + symbols in everywhere there should be a space.  This order processed correctly in the shop without the + symbols but again it just seemed odd following a missing order the day before.

 

Running 2.3.4 bootstrap with latest paypal module installed.

Link to comment
Share on other sites

Usually, this kind of missing order means that the customer did not follow instructions, and return to the store from the PayPal site after completing payment. Does your payment mechanism take them offsite to PayPal? I thought there was code in recent osC versions to minimize the chances of a customer not realizing they had to return to the store, or else recover from failure to do so, but maybe something else happened.

Link to comment
Share on other sites

Its a highly unusual occurrence, have checked the system and it all works when creating an order.

 

The order process is as follows

 

Checkout -> Send customer to Paypal (Marks order status as awaiting completion with paypal) -> Customer makes payment ( Order Status changes to processing and IPN details recorded in log)

 

Given that paypal handles communicates the IPN to the shop it shouldn't matter if the customer leaves paypal as soon as they have paid.

 

If a customer goes to paypal and then closes the window the order still exists in the admin panel as "awaiting completion with paypal" and will only delete if the customer clicks "Cancel and return to store" at the bottom of paypal page.

 

In paypal everything appears to have worked correctly and it shows an IPN message was transmitted at the time.  Just in the store database the order has disappeared completely.

 

From the documentation

 

 

The customers order is saved in the database on the checkout confirmation page before the customer is forwarded to PayPal to finalize their payment. The order is saved in the database with this defined order status.

The order status is updated again when the customer finalizes the payment at PayPal and returns back to the store. The order status is also updated when the Instant Payment Notification from PayPal is received.

If the customer does not finalize the payment at PayPal, the order remains in the database with this order status and can be removed after a period of time.
When the customer goes through the checkout procedure and lands on the checkout confirmation page, their order is saved in the database with a private order status (by default, Preparing [PayPal Standard]). The order status is updated to an acknowledged order status (by default, the default order status level) when the customer returns back to the store from PayPal after payment has been made, or when the IPN notification is received if the customer didn't return back to the store.
If the customer did not finalize the payment at PayPal and does not return back to the store, the order remains in the database with the Preparing [PayPal Standard] order status and can be safely deleted after a period of time.

 

The IPN should complete the order regardless of whether the customer returns to the store or not and if there is any other failure with paypal communicating success the order should remain with status "Awaiting Completion"

 

It may be a freak occurrence but it would be nice to know if there was a way to debug it or if the shop kept a record of the order somewhere.  Paypal has all the info as to what the customer ordered so it is not a huge problem, knowing customers it will more than likely be something odd that they have done but it would be nice to think this shouldn't happen by design. 

Link to comment
Share on other sites

Hmm. It sounds like you have the up-to-date code that preserves the order if the customer wanders off after paying (but before returning to the store to finalize the sale). Perhaps there's a glitch in the code somewhere that opens a small window for the database not to get updated? Something else you might want to check -- ask your host if they experienced any DB glitches around that time, or even if there was a crash and they did a restore, which might have lost your latest transactions. That's all I can think of at the moment. Hopefully you can find out the order and customer details from PayPal, or at least ask them to notify the customer that they need to contact you.

Link to comment
Share on other sites

  • 2 weeks later...
Link to comment
Share on other sites

I have experienced this problem a few times, but, though spending many weeks trying, have never managed to replicate it.

 

A consideration was that use of the browser back/forward buttons could be a possible cause. I believe checkout_payment deletes order details if they already exist, checkout_confirmation creates the initial order details. Paging between the two causes creation/deletion. However, on the browsers I’ve checked it is not the reason.

 

The only way I have found to force the fault is to have two pages open at the same time, paging back within the checkout process on one page whilst going forward with the process on another page. Probably a very unlikely event, probably not the reason.

 

To see if it helps, for the moment I have removed the order tables deletes from function selection() in paypal_standard.php.

 

Obviously if the problem happens again I will know that the attempt didn’t work. Unfortunately, if it is a solution, I will never know for sure.

 

A downside to this is that incomplete orders are left on the database, they can be easily deleted from within admin. You may be surprised at how often orders are recreated.
Link to comment
Share on other sites

Revert back to the older version of the app if you were using it. It appears that a few people are having problems. Then figure out how to report it as a bug and hopefully someone will eventually get round to fixing it.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Hi,

 

we had this, too.

 

It seems, in our case, the culprit was the "Order Status" option in the "PayPal Payments Standard" Settings.

It was set to "-- Store Default Order Status --". This setting caused the orders to be deleted after a successful checkout.

 

We set it to "Delivered" (we're selling Downloads and our customers expect to download the items directly after payment). The order stays in the database after checkout and is set accordingly.

 

Still, this setting shouldn't delete the order from the database and it shouldn't have a different behaviour in live- and sandbox-mode. The sandbox worked like it should with  "-- Store Default Order Status --", the live-mode failed. It confuses the heck out of me.

 

AD

Link to comment
Share on other sites

  • 3 weeks later...

PayPal are making lots of changes and lots of upgrades to their security. Some changes have happened and some are still to come.  There is a page here that may be of interest https://www.crucial.com.au/blog/2016/05/26/what-do-paypals-security-upgrades-mean-for-you/ There are other pages also.

 

Generally PayPal sent out emails to all of the merchants that would be affected, but people dismissed the emails and never read them.

 

May be your problems are related to these upgrades if they only recently started. I believe that the PayPal app should work fine, so if you are using the app, then your problems may be related to something different. If you are not using the app, then this may be the cause of your problems and your pay pal modules may need to be upgraded. It may also make a difference if your customer used a PayPal account rather than paid using a debit or credit card.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...