Jump to content
thirty bees forum
  • 0

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


30knees

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.

Link to comment
Share on other sites

16 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?

Link to comment
Share on other sites

  • 0

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
Link to comment
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?

Link to comment
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
Link to comment
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!).

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

Link to comment
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?

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...