Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Paypal IPN Duplicate Orders

Paypal IPN Duplicate Orders

Locked

Views: 4,954

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
31 Jan 2009, 6:43 AM
#1
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Paypal IPN Duplicate Orders

I am having a problem I am not sure there is an easy resolution to lol

Since Jan 9, I noticed that I was getting twice the paypal debug emails I normally get which at that stage didn't concern me at all, so I left it, then last week I noticed that the reward points that normally were automatically assigned to pending status in a customer's account weren't being assigned at all, with Paypal IPN this usually happens when the transaction is recorded as unique instead of web_accept (activating PDT usually records them as web_accept) so I checked Paypal IPN in admin and all orders since this date were recorded as unique.

Also since this date I was receiving PP debug emails from the store whenever someone paid me through my account...not the store...so I started thinking this was a PP problem and not related to the store, yet they swear blind it is the store script and not them.

I posted in the SSU SEO Mod support thread as the only change that had been made on my website was that I upgraded the mod on the 9th, the result being that after turning off SSU and placing a test order, I now got duplicate orders recorded into the database, so I don't believe the mod is at fault.

After giving this some more thought, at the same time I upgraded the mod I also followed the instructions to change the Automatic Return URL in my Paypal account from the default https://www.havendesignz.com/store/index.php?main_page=checkout_process to the SSU generated URL of https://www.havendesignz.com/store/checkout_process

I have since the previous postings in the support thread tested this several times today by changing that url back and forth between orders and every time I get the same results...default url on generates the duplicate orders, ssu url on seems to prevent the duplicate orders but records the 'second IPN sending' of the unique transaction ID, and in each case the paypal logs have been identical in structure, just the way they are recorded into the database is different.

Paypal swears blind it is the store script and not them at fault, yet I remember when they did actually have a problem with their server generating duplicated orders last year (I got caught in that one too LOL)

Between the 9th (last 'normal' order recorded) and the 11th (first of these non-normal) the only change made in any area was the SSU mod upgrade and changing the return url in Paypal settings.

This is a book LOL and I'm sorry, I just need some help trying to figure this out if possible because I want it to go back to recording just the one order as web_accept...anyone have any ideas?

31 Jan 2009, 3:39 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

And are you having the same problem with a stock installation?

31 Jan 2009, 6:45 PM
#3
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

Hi Kim, I haven't tried switching back to classic and making a test order, but I do have a separate default stock installation I do my designing on, so I might activate the PP on that and get someone to test it for me, will get back to you with the results :)

31 Jan 2009, 7:31 PM
#4
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

Ok, I ended up with two of my friends making test orders on a default installation for me and both got the exact same results as my live cart....this leads me to believe it has to be a problem on Paypal's end right?

And yup I changed both URL's in my PP account to go back to the test install before testing lol

Blah, off to battle with them yet again LOL

31 Jan 2009, 11:02 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Paypal IPN Duplicate Orders

There have been occasional reports of PayPal IPN transactions showing duplicates.
While it's been difficult to recreate the problem consistently in order to debug any potential problems on the ZC end, it has been reported that turning off the PDT option stops the duplication from occurring.
That may or may not work for you.

1 Feb 2009, 1:19 AM
#6
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

Thanx DrByte, I did consider turning off the PDT but I activated it to make full use of the reward point mod (which I am conversely now not getting lol)

Since this started happening completely out of the blue and has been confirmed to be happening also on a completely clean install I am convinced it is something that needs fixing on Paypal's end and sent them the new logs of the testing this morning, and I have my fingers crossed I won't keep butting up against the same wall I have been butting up against with them since first reporting this lol

I will have to wait till after the weekend though as I believe their operating hours for the merchant support are Mon-Fri.

I am wondering though if they tried something late yesterday as the duplicate orders have not been recorded in the database since my testing and email to them then, just the logs are recording IPN sending the info twice, on both my store and the clean install....not sure there LOL

11 Feb 2009, 11:08 PM
#7
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

I am revisiting this because I feel as if I have hit a brick wall and Paypal is still refusing to even entertain the notion that this could be an error from their end, and a fresh set of eyes or any other suggestions at this point would be most welcome.

Since my original posting, I have tested on a clean fresh install of ZC...same result....I have in turn turned off both the IPN and the PDT in my Paypal Account, my hosting has gone above and beyond in their attempts to help me out, they even moved me from one server to another and in every case there is NO change, the results are exactly the same in that IPN is sending the information back to the store twice, once as web_accept and the second as unique.

I have done every single thing that has been requested and more, I have spent hours pouring over similar threads here and trying all suggestions there and still nothing changes the end result.

I, at this point, remain firmly convinced that there is an error of some sort from Paypal's end creating this, especially since it started right out of the blue, but no one there is willing to look into it further, I just get 'We have not changed the way we handle IPN processing.'

Anyone have any ideas?

11 Feb 2009, 11:55 PM
#8
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

The test site you set up, is it on the same server? Just a wild guess, but how about using a different server to test?

11 Feb 2009, 11:58 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Paypal IPN Duplicate Orders

Is PDT still turned off?

12 Feb 2009, 12:02 AM
#10
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

yellow1912:

The test site you set up, is it on the same server? Just a wild guess, but how about using a different server to test?

Yep it is on the same server, the testing was done on the previous server though, and my hosting have since migrated me to a new server where the same issue is still happening....I don't have another server to test on lol

DrByte:

Is PDT still turned off?

Yes it is still turned off :)

12 Feb 2009, 2:33 AM
#11
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Paypal IPN Duplicate Orders

Here is my latest reply back from Paypal Technical, I am really quite upset that they don't even seem to read my emails to them properly

Dear Lissa,

We have already verified that we do not send a txn_type of  unique through either IPN or PDT. I have seen that this variable is used by Zen  Cart in the Zen Cart forums. The only thing more you could do is implement raw  logging to see what you are actually receiving from us.

I do see that  your shopping cart is passing the variable rm=2 which causes the return method  to be a POST. 

From HTML posted by your cart:
<input type="hidden"  name="rm" value="2" />

According to our docs at [URL]https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer[/URL]/e_howto_html_Appx_websitestandard_htmlvariables,  "If set to “2” and if a “return” value is submitted, the buyer will be sent back  to the return URL using a POST method, to which all available transaction  variables will also be posted."

If it is an option within the Zen Cart  you may want to change that variable to "1" so that the return is a GET. Or just  remove that line altogether. With PDT the information is sent via a GET so it  would be best to avoid conflicting instructions.

Since you are using both  IPN and PDT you will receive duplicate posts from PayPal. The only thing further  I could recommend is disabling one or the other, or adjust the coding in your  script to deal with duplicate posts. 

Regards,
```Is this even worth trying? And where would I change it to try?

This is my reply to PP, I really cannot see how on earth it can be the fault of the cart script when it started happening right out of the blue with no changes, and has happened not only on a clean install but a new different server but maybe I am just being one-eyed and blind cos I cannot see anything else to try

I will post this on the ZC forum but I am just over this, didn't you read that I HAVE THE PDT TURNED OFF AND AM STILL RECEIVING DUPLICATE POSTS, and there are dozens of posts on the ZC forum where unique is exactly the txn_type received from Paypal, take a read through the [URL="https://www.zen-cart.com/forum/showthread.php?t=95021"]reward points thread[/URL] as this has been a thorn in the developer's side from the start.

Every single normal order I had through Paypal before activating the PDT was of the txn_type unique, it was ONLY when activating the PDT that it changed to web_accept.

My cart is passing NOTHING different to the thousands of ZC other carts operating out there yet there are a handful of us reporting this type of issue....and you are going to persist in blaming it on the cart despite in my case, my having tested it on a clean install, moved servers and implemented everything suggested to me and still nothing changes.

At this point in time I would like to deal with another technical officer as I do not feel you are in the slightest willing to look any further into this except to keep placing the fault at a cart that had NO CHANGES MADE when this all started happening

Lissa