Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
30knees

PayPal order missing, even though paid and with shop order number

Question

A customer wrote today asking about her order with the number XYZ. She said she paid by PayPal but didn't get any order confirmation from us.

I checked and couldn't find an order in her name. She then forwarded me the PayPal confirmation email. It references an order in our shop that belongs to another customer. I can see the PayPal transaction in PayPal, but not in our shop.

How is it possible that an order was successfully placed but without it registering in the shop? Is there a way I can figure out whether stock was deducted?

We're using Mollie 3.3.5 to process PayPal orders.

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I think that if you are not using PayPal rest api to process orders than the payment in PayPal happens prior to the customer being redirected back to your shop, which only at that point the Cart object turn into an Order object  (thats how most payment modules works).

So there is a chance that you will get money in your PayPal account from a customer but your shop did not process the order yet.

If you are using PayPal rest api to process orders than only when the customer redirect back to your shop you can execute the actual payment from PayPal (which makes it a smoother process with less chance of failing in between).

It references an order in our shop that belongs to another customer

about this part it doesn't really make any sense how can one order post on different client. are you sure about that?

Share this post


Link to post
Share on other sites
  • 0

Unfortunately, I'm not sure how to check whether the Mollie module uses the rest api. But I did find that someone reported a similar issue: https://github.com/mollie/PrestaShop/issues/107

About the bit with the order number: I triple checked. The PayPal order number references a different customer's order.

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

I have seen such problems more than once with Prestashop.

After the payment is made your payment provider calls some link at your shop that should trigger the shop to convert the shopping cart of the customer into an order. When for some reason that call back doesn't work the cart never becomes an order. 

So the short term "solution" is to look among the carts for this order. As naming can vary I usually prefer to look for the exact amount and time.

For a more definitive solution you might have a look at your error log. It could be that there is some php error that crashes your callback.

Edited by musicmaster
  • Like 2

Share this post


Link to post
Share on other sites
  • 0

Just a note that this happened again.

I have a Paypal paid order that isn't in the shop.

Paypal shows order number 123 but the store order number 123 belongs to a manually created order 123. Both orders were placed approximately at the same time. I guess some fluke meeting of orders?

Share this post


Link to post
Share on other sites
  • 0

This is happening again lately, always with PayPal orders. Has anybody else noticed this?

Share this post


Link to post
Share on other sites
  • 0

I've had these happen before, I havent seen it lately.  I use Paypal v5.4.2, and am on tb v1.1.x Bleeding Edge.  What are your versions for both?

Share this post


Link to post
Share on other sites
  • 0
On 6/12/2019 at 5:24 AM, 30knees said:

Just a note that this happened again.

I have a Paypal paid order that isn't in the shop.

Paypal shows order number 123 but the store order number 123 belongs to a manually created order 123. Both orders were placed approximately at the same time. I guess some fluke meeting of orders?

I think @musicmaster described the reason this happens pretty well. If the cart of the missing order isn't converted into an order in TB then the next order created will get the order number that was supposed to be used for the "missing" order.

However this brings up another question, and another possible reason this could be happening: It takes time for people to complete checkout with PayPal. On the short side of things 10-20 seconds but in some cases it could take several minutes. (Person trying to find their PayPal password, doing password recovery, creating a new shipping address, or something like that.) If in fact Mollie is checking for the next available order number to send to PayPal (but not immediately creating the order on TB) then an order number collision could happen.

Like this:

Customer 1: Gets to the end of the checkout process and the Mollie module sends them off to PayPal to complete the checkout process. Before sending them, Mollie looks to see what the next available order number is. Let's say "513". Mollie sends this number to PayPal so the order number is included with the PayPal payment. Customer #1 takes some time to finish up with PayPal.

Customer 2: Gets to the end of the checkout process before the previous customer completes their PayPal payment with Mollie. In this case when Mollie looks up the next available order number it will also find "513", and will send 513 to PayPal. Customer #2 heads off to PayPal to complete payment and completes payment very quickly. Mollie then converts their pending cart into an order using order #513.

Customer 1: They finally complete their PayPal payment and are returned to TB. Mollie tries to convert the cart into an order but order #513 is now used by Customer #2's order. This results in a unique ID collision and Mollie fails to convert the cart into an order.

In your case above where order #123 belongs to a manually created order, replace Customer #2 with your manual order creation. Same thing happens. The order number Mollie expected to be able to use ends up being used by your manually created order before Customer #1 completes their PayPal payment.

The above is just speculation on my part as I do not know the internals of how Mollie works and I do not know if Mollie actually waits to convert the cart into an order until after the PayPal process completes. Someone like @datakick might have a better idea.

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, SLiCK_303 said:

I've had these happen before, I havent seen it lately.  I use Paypal v5.4.2, and am on tb v1.1.x Bleeding Edge.  What are your versions for both?

I'm on Mollie v3.3.5 and also Bleeding Edge.

@dynambee's reasoning sounds like it could be what's happening (thanks!).

Share this post


Link to post
Share on other sites
  • 0

I've always been under the impression it's a rounding issue....but whatever  😉

  • Haha 1

Share this post


Link to post
Share on other sites
  • 0
18 minutes ago, SLiCK_303 said:

I've always been under the impression it's a rounding issue....but whatever  😉

I thought the rounding errors caused the PayPal payment itself to fail? Maybe I'm misremembering or misunderstood.

Speaking of the PayPal rounding issues, I found a problem recently that might be related to that.

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, dynambee said:

I think @musicmaster described the reason this happens pretty well. If the cart of the missing order isn't converted into an order in TB then the next order created will get the order number that was supposed to be used for the "missing" order.

However this brings up another question, and another possible reason this could be happening: It takes time for people to complete checkout with PayPal. On the short side of things 10-20 seconds but in some cases it could take several minutes. (Person trying to find their PayPal password, doing password recovery, creating a new shipping address, or something like that.) If in fact Mollie is checking for the next available order number to send to PayPal (but not immediately creating the order on TB) then an order number collision could happen.

Like this:

Customer 1: Gets to the end of the checkout process and the Mollie module sends them off to PayPal to complete the checkout process. Before sending them, Mollie looks to see what the next available order number is. Let's say "513". Mollie sends this number to PayPal so the order number is included with the PayPal payment. Customer #1 takes some time to finish up with PayPal.

Customer 2: Gets to the end of the checkout process before the previous customer completes their PayPal payment with Mollie. In this case when Mollie looks up the next available order number it will also find "513", and will send 513 to PayPal. Customer #2 heads off to PayPal to complete payment and completes payment very quickly. Mollie then converts their pending cart into an order using order #513.

Customer 1: They finally complete their PayPal payment and are returned to TB. Mollie tries to convert the cart into an order but order #513 is now used by Customer #2's order. This results in a unique ID collision and Mollie fails to convert the cart into an order.

In your case above where order #123 belongs to a manually created order, replace Customer #2 with your manual order creation. Same thing happens. The order number Mollie expected to be able to use ends up being used by your manually created order before Customer #1 completes their PayPal payment.

The above is just speculation on my part as I do not know the internals of how Mollie works and I do not know if Mollie actually waits to convert the cart into an order until after the PayPal process completes. Someone like @datakick might have a better idea.

I am not familiar with Mollie module, but all the payment modules I am aware of don't really use the next available order number when using redirect method to payment gateways, they just send the cart id and expect to get it back when being redirected back to TB.

and only than using the cart id with validateOrder function to create an order in the system. thats the proper way for creating an order from payment module.

cart id is unique for a specific cart & customer so I don't really know how its possible to mix orders with carts unless the payment module is sending  the wrong cart id or processing an order based on wrong cart id.

Share this post


Link to post
Share on other sites
  • 0
2 minutes ago, yaniv14 said:

I am not familiar with Mollie module, but all the payment modules I am aware of don't really use the next available order number when using redirect method to payment gateways, they just send the cart id and expect to get it back when being redirected back to TB.

I am also not familiar with Mollie. However if the TB order number is showing up in the PayPal payment then it must be being passed from TB to PayPal by the Mollie module. I do not see this order number showing up in PayPal with the TB PayPal module so I don't think the same thing is happening with the TB module.

@30knees, can you confirm that it is the TB order number that is appearing in the PayPal purchase details? Do you know if it is the id_order value or if it is the order reference value?

Share this post


Link to post
Share on other sites
  • 0

@dynambeeWhen I login to PayPal and go to order details I see the tb shop order number, which PayPal calls invoice number. Is there anywhere else you'd like me to look?

Share this post


Link to post
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...