News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED partially!]Duplicate PayPal Orders in Backend

Started by optmax, March 13, 2013, 18:21:01 PM

Previous topic - Next topic

optmax

J!2.5.9
VM 2.0.18a
PHP 5.3.17

Vm Payment plugin Paypal 2.0.12
SSL installed and enabled

When a PaylPal order is made I get two orders in the Backend with different order number and ids but identical content.
The PayPal IPN updates the first of the pair to Confirmed- see attached screenshot.

I receive the PayPal notification email and the VM system Confirmed email.

I guess it is a configuration setting but where?
In VM or at PayPal?
The PayPal account was originally configured for a VM 1.0 site.  What if anything should I change?

Any help or advice is welcome.
Thanks

[attachment cleanup by admin]

PRO

an order is created when they get redirected to paypal.

IF they do not pay then, the order stays, and is pending

optmax

#2
PRO - thanks for the input but...

They do pay as they order!
Look at the order creation times in the screenshot - identical (to the minute anyway) and it is the first order id/number (second row in the screenshot) that is updated by the IPN.

Just checked the orders database table: the time stamp on the later (top row screenshot)  'Pending' order  is 1 sec after the first order (2nd row screenshot).

The duplication happens for every PayPal order received.

dennisg

Hi optmax,

I have the exact same issue with a credit card plugin I'm using.

Any luck solving this?

AH

You need to step through the process on the frontend to see if the cache is cleared (i.e.) the cart is emptied after you go to paypal.

Regards
A

Joomla 4.4.5
php 8.1

drukman2000

Hi,

Here is the solution....
Whenever emails are set at the same time BOTH to "Confirmed" & "Confirmed by shopper" - the system will create duplicate orders.
Just avoid this situation.

Thanks - Drukman.

Maxim Pishnyak

Isn't this looks logically?

1st "confirmed" - 1st order.
2st "confirmed" - 2nd order.

No?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

AH

Regards
A

Joomla 4.4.5
php 8.1

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

drukman2000

Quote from: Maxim Pishnyak on July 30, 2013, 20:53:13 PM
Thanx, Hutson, for pointing this.

Just found another configuration that cause duplicate orders to appear....

The next configuration causes Duplicate Orders to appear:

1. "agreed" uder the Shopper Fields is mandatory & published.
2.  "Show Terms of Service on the cart/checkout?" is active.

We are very far from being "bug free" -)).
Drukman.


Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

optmax

VM 2.0.26d
J!2.5.16

I started this thread back in March 2013 but I have finally found the culprit - on my site at least.

I had a Custom HTML module with JavaScript displaying a clock.  This module fetched the server time using an XMLHttpRequest().

This module was shown on the cart pages.

With this PayPal orders were duplicated with different order numbers, one Pending and one Confirmed.

I have now found that if I fetch the client time using Date() then no order duplication occurs.

Anyone any ideas as to why XMLHttpRequest() causes the problem?

I guess it is some kind of timing issue but as this has been driving me mad for 10 months I would like to know why?

optmax

I spoke too soon...

Using client time prevents some duplcates but unfortunately not all - around 50% in first 24 hours.

Any ideas anyone?