Jump to content

No order created from this cart - but payment recieved


saynernz

Recommended Posts

Hi there! Hoping someone can help me out.

 

My client has a Prestashop site and every now and again (maybe once every 3-4 months or so) she gets a customer emailing her asking about their order, which she has no record of, but a look at her bank account tells her that the customer has paid and it matches a shopping cart record which says "No order created from this cart".

 

The payment module is a custom DPS module. I've asked the third-party developer who created it if this could be caused by the module, but he tells me that Prestashop creates the order first before the customer is taken to the off-site DPS secure payment page.

 

Mail Alerts model is active and alerts the client of new orders, but not when this happens. The customer buying from the site also does not appear to receive confirmation emails.

 

My client is running Prestashop v1.4.8.2 (I know it's outdated but there's no time to update at the moment)

 

Can anyone point me in the right direction for a fix?

  • Like 1
Link to comment
Share on other sites

Hi, I have been using a DPS pxpay module for 18 months on two sites and I have the same issue. I can sometimes get a few orders a week that don't complete properly. The items are always left in the customers cart so I login to their account and finish the sale but it is frustrating.

I also use PayPal but it only occurs on the DPS module. The problem is so intermittent I have not been able to trace it and it does not throw any errors.

 

Let me know if you find a solution. I am happy to contribute to the cost of the fix.

 

Cheers

Steve

Link to comment
Share on other sites

Thanks Steve, no solution yet. I agree - what's most annoying about this is that it's difficult to test, since it seems to happen so randomly and rarely. I've tried a couple of different fixes over the last few months and thought the issue solves, only to have it happen again.

Link to comment
Share on other sites

I would add some debug statements in the module coding BEFORE the order is created and the customer is redirected.  Add these to a log file in the module directory.

 

This way you can trace the actions of the customer as they check out.  In the future, when an order goes missing, you can then refer back to the log file and determine what debug statements were not executed.  Then you can go back and revisit those steps in the coding to determine why they failed.

 

Sometimes things like this are what we call 'intermittent' external issues.  For example, there could have been a database timeout when the order was being created, or a connection limit exception, which caused it to fail.  And if the module ignores this error and redirects the customer to the payment form, then you could encounter the scenario of a missing order.

 

The module should have a try/catch block around the "validateOrder" function.  it that were to fail, the module would "catch" the error and can then determine to NOT redirect the customer, but instead show an error to them, or notify the merchant via email that something went wrong.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I have this same problem intermittently. What is the procedure for manually converting a shopping cart to  a completed order when payment has been received? I see mention of logging in as the customer to complete the transaction, but cant find the procedure in the users guide....

Any help is greatly appreciated. 

Link to comment
Share on other sites

  • 4 weeks later...

I am having similar issues. Can you confirm the following details:

1) Cart details are present and correct in manager>Customers>Shopping carts and clicking on the offending cart entry to view the cart details.

2) The order is present for the cart in the cart details page. If it is, click on the Order #XXXXX to view the order details.

3) Does the order have a status?

 

With DPS in single click mode the success callback url is always called twice (as seen here) once for the completion of the transaction and the second for the redirect back to the site. I was seeing a correlation in my logging with this parallel call and failures. DPS is not the problem, I am logging pre and post transaction calls and requests between the two and there is no error with the DPS process. It doesn't make sense that parallel calls would cause it though. I added a couple of checks to bail if an order had already been created by the other process and used a random delay to force both out of sync but I see cases where the two processes have returned a successful result. When I do have a failure only one result is logged. 

 

The most recent fails added the order to the DB but failed to add the entry to the order history which also contains the order status. Without the history being set it didn't show up in the list of orders and could only be found through the cart, no invoice was generated and the order itself had an error in displaying the status. I could not see a clear error path that would stop the history being added.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

I did have some success in fixing this issue but forgot to post it back here. It was a while ago but here's what I remember.

 

1, The DPS module was sending the cart reference or something similar as the DPS transaction reference and if the customer backed out before completing the credit card payment or if it failed, It would no longer work as DPS will only accept a unique reference that has not been used before. I changed it to use the current & date time which is always unique. These effected customers were not able to reach the payment screen a second time.

 

2, The customer address cannot contain anything other than text and numbers so if a customer uses an address like 12/6 mystreet, it will fail as the / is accepted but appears in the return url by DPS but is interpreted incorrectly and fails to complete.  It does not throw any errors but it just does not complete properly. 

 

I hope this helps 

 

Steve

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...