Jump to content

Stock Control/Payment Bug?


Tony

Recommended Posts

Cubecart v6.4.2

PHP v7.4.13

MySQL v5.5.5-10.3.27-MariaDB

Not sure if this is a bug or not, so thought I'd post it here to check with others.

Customer #1 placed an order for an item that was 1 left in stock -> PayPal failed to process the payment so was stuck as 'Pending'

Customer #2 placed an order for the SAME ITEM as Customer #1 a few minutes later -> PayPal processed the order and went into Processing status

Few minutes later, Customer #1's PayPal got processed, the payment arrived and CubeCart changed the order from Pending to Processing. The delay seems to be on PayPal side, something to do with Unconfirmed account or something

But the stock level is now -1 (minus 1) and I only have 1 item in stock.

I had to contact Customer #2 and explained, apologised and refunded.

In my views, this should have not happened at all.

Is this a bug? 

Link to comment
Share on other sites

6 hours ago, bsmither said:

In admin, Store Settings, Stock tab, "Reduce stock levels" is to what?

"When payment has been made (Processing)"

 

6 hours ago, bsmither said:

If not Pending, then yes, there could be a 'race' condition.

Perhaps have it to check the stock level before marking it as Processing after xx seconds ? Or another way?

Link to comment
Share on other sites

Please give some thought to selecting "Pending" for this option.

When CubeCart sets an order to Processing, it is assumed that the order has just now been successfully paid for.

There is no intermediate step of re-verifying the basket contents after the customer chooses the gateway, and then CubeCart sends the customer off to make payment.

There is another setting that will auto-expire Pending orders after X number of seconds. If that setting is engaged, and customer fails to make payment within that time delay, the basket is dumped and the customer will have to start over.

Link to comment
Share on other sites

2 hours ago, bsmither said:

Please give some thought to selecting "Pending" for this option.

There is another setting that will auto-expire Pending orders after X number of seconds. If that setting is engaged, and customer fails to make payment within that time delay, the basket is dumped and the customer will have to start over.

This is a possible solution, but it does mean that orders sitting at Pending have stock allocated against them blocking it from being available to other users, unless the auto-expire number of seconds is very low which should then release the stock and make it available again.  This however, can cause it's own problems

Link to comment
Share on other sites

Due to the nature of my business, I do not wish to use Pending status to hold the stock as they are always sold out as soon as I make the stock available. So I prefer to stay with Processing to ensure sales.

So what is the best way to resolve this? This has happened 3 times so far and it's getting embarrassing each time this happens as I had to email and explain...

What about verifying the stock level at the *final* stage of payment?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...