Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35
  1. #1
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default [Resolved v1.3.9d/e] Paypal IPN double orders

    I recently had my host upgrade to PHP 5.2, so had to implement Dr Byte's fix for a speedy resolution. A couple of days later I noticed I started getting double orders, and worse still, my customers were getting double order emails. Each email has a consecutive order ID.

    So best thing to do was to upgrade the 1.3.6 to 1.3.8. I was not sure whether the double orders were related to the sessions.php fix or something unrelated, but hoped an upgrade would solve both. I have just got my copied DB working on a "zen new" sub directory, and having just tested an end to end user order, I am still getting the double order.

    Is this a known issue on the Paypal side (I read a thread where this happened before, ages ago) or something I can solve myself.

    Because I was testing the install in a sub directory, I had to change the URLs on Paypal.com before the test. I wonder if I did not leave it long enough between changing them and testing?

    Thanks for any help.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Paypal IPN double orders

    There have been some reports of getting duplicate notifications if you have PDT support enabled, and disabling that has been known to minimize that problem in some cases.
    But, PDT support was only added in 1.3.7.1
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: Paypal IPN double orders

    Thanks Dr.

    I did notice that the PDT option is enabled on Paypal.com, presumably by default when they added the feature. I wonder if switching that off might help.

    I just don't see how the sessions.php fix could have done anything.

    Either way, I will properly upgrade and see if it's still occurring.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Paypal IPN double orders

    The sessions.php "fix" has nothing to do with PayPal orders.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: Paypal IPN double orders

    Upgrading seemed to do the trick.

  6. #6
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: Paypal IPN double orders

    Scratch that - my test orders worked, but a *real* one has just come through and again the double order.

    Given that this seems to just affect me, and I am not using PDT, I am at a loss

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Paypal IPN double orders

    Might be worth enabling paypal debug logging, and checking your logs folder for the IPN logs and see whether you're actually getting duplicate transactions from PayPal. Zen Cart should be detecting duplicates if they have same originating transaction ID from PayPal. But if PayPal is sending duplicates with different transaction IDs, I can see problems happening ... beyond control of ZC.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: Paypal IPN double orders

    Thanks Dr and sorry in advance for the mammoth post.

    I enabled logs to file, and a couple of orders greeted me this morning.

    Looking at the logs, there are two separate files that reference the same chap:

    Code:
    Feb 17 2009 17:26 -- Keys for submission: Array
    (
        [charset] => iso-8859-1
     //
    STUFF
    //
        [tax_cart] => 0.00
    )
    The second seems more comprehensive:

    Code:
    Feb 17 2009 17:28 -- IPN PROCESSING INITIATED. 
    *** Originating IP: *.*.*.*  notify.paypal.com
    
    Feb 17 2009 17:28 -- IPN INFO - POST VARS received (sorted):
    Array
    (
    STUFF
    )
    
    
    Feb 17 2009 17:28 -- IPN INFO - POST VARS to be sent back for validation: 
    To: www.paypal.com:80
    POST /uk/cgi-bin/webscr HTTP/1.1
    Host: www.paypal.com
    Content-type: application/x-www-form-urlencoded
    Content-length: 821
    Connection: close
    
    Array
    (
    STUFF
    )
    
    
    Feb 17 2009 17:28 -- IPN INFO - Confirmation/Validation response 
    SUCCESS
    
    Feb 17 2009 17:28 -- Breakpoint: 1 - Collected data from PayPal notification
    
    Feb 17 2009 17:28 -- IPN INFO :: Transaction email details.
    From IPN = * | *
    From CONFIG = *
    
    Feb 17 2009 17:28 -- Breakpoint: 2 - Validated transaction components
    
    Feb 17 2009 17:28 -- Breakpoint: 3 - Communication method verified
    
    Feb 17 2009 17:28 -- IPN NOTICE :: Could not find matched txn_id record in DB. Therefore is new to us. 
    
    Feb 17 2009 17:28 -- Breakpoint: 4 - Details:  txn_type=unique    ordersID = 0  IPN_id=0
    
       Relevant data from POST:
         txn_type = unique
         parent_txn_id = None
         txn_id = *
    
    Feb 17 2009 17:28 -- Breakpoint: 5 - Transaction type (txn_type) = unique
    
    Feb 17 2009 17:28 -- IPN INFO :: Currency/Amount Details: 
    PayPal email address = ***
     | mc_currency = GBP
     | submitted_currency = GBP
     | order_currency = GBP
     | mc_gross = 4.99
     | converted_amount = 4.99
     | order_amount = 4.99
    
    Feb 17 2009 17:28 -- Breakpoint: 6 - Completed IPN order add.    ordersID = 6715  IPN_id =1202
    So it does seem like Paypal are doing this. T tried switching the web service URL to the UK one layt night to see if it made any difference - evidently not.

    Something possibly trivial - the Paypal account here is also used as the payment source for an eBay shop. I had 3 orders on the site since my last post so expected 3 (or in our case, 6) logs. I had 20 odd, and looking at them, they all seem to be referencing eBay auctions. I am a bit concerned as aside from this site, I am not using any other cart and there are things in the logs like auction titles so I know it's coming from eBay.

    How on earth is Paypal getting logs to appear in my ZC install?

    Code:
    Feb 17 2009 17:16 -- IPN PROCESSING INITIATED. 
    *** Originating IP: *.*.*.*  notify.paypal.com
    
    Feb 17 2009 17:16 -- IPN FATAL ERROR :: Could not find stored session in DB, cannot re-create session as PayPal IPN transaction.
    
    Feb 17 2009 17:16 -- IPN FATAL ERROR :: No saved IPN session data available. Must be an Express Checkout or Direct Pay transaction.
    
    Feb 17 2009 17:16 -- IPN INFO - POST VARS received (sorted):
    Array
    (
    STUFF
    )
    
    
    Feb 17 2009 17:16 -- IPN INFO - POST VARS to be sent back for validation: 
    To: www.paypal.com:80
    POST /uk/cgi-bin/webscr HTTP/1.1
    
    Host: www.paypal.com
    
    Content-type: application/x-www-form-urlencoded
    
    Content-length: 1312
    
    Connection: close
    
    Array
    (
    STUFF
    )
    
    
    Feb 17 2009 17:16 -- IPN INFO - Confirmation/Validation response 
    SUCCESS
    
    Feb 17 2009 17:16 -- Breakpoint: 1 - Collected data from PayPal notification
    
    Feb 17 2009 17:16 -- IPN INFO :: Transaction email details.
    From IPN = * | *
    From CONFIG = *
    
    Feb 17 2009 17:16 -- Breakpoint: 2 - Validated transaction components
    
    Feb 17 2009 17:16 -- Breakpoint: 3 - Communication method verified
    
    Feb 17 2009 17:16 -- IPN NOTICE :: Could not find matched txn_id record in DB. Therefore is new to us. 
    
    Feb 17 2009 17:16 -- Breakpoint: 4 - Details:  txn_type=unique    ordersID = 0  IPN_id=0
    
       Relevant data from POST:
         txn_type = unique
         parent_txn_id = None
         txn_id = *
    
    Feb 17 2009 17:16 -- Breakpoint: 5 - Transaction type (txn_type) = unique
    
    Feb 17 2009 17:16 -- IPN WARNING :: Currency/Amount Mismatch.  Details: 
    PayPal email address = *
     | mc_currency = GBP
     | submitted_currency = GBP
     | order_currency = GBP
     | mc_gross = 14.30
     | converted_amount = 0.00
     | order_amount = 0

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Paypal IPN double orders

    The IPN handler should be able to decipher between PayPal transactions originating by your cart vs anything that it receives from eBay transactions (it normally just ignores those).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Nov 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: Paypal IPN double orders

    Quote Originally Posted by DrByte View Post
    The IPN handler should be able to decipher between PayPal transactions originating by your cart vs anything that it receives from eBay transactions (it normally just ignores those).
    Thanks again.

    The IPN handler in ZC? But why is Paypal even invoking it in the first place if the users are paying via the eBay/ Paypal website?

    In the case of the double orders, is what is contained within those code snippets enough to trigger two orders? The first one seem like it's just an array, whereas the second one has various success statements and references a ZC order ID.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Double-Order, One Charge (a bug in the PayPal IPN - Website Payments Standard?)
    By ilikemike in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 30 Dec 2011, 04:40 PM
  2. Paypal IPN Duplicate Orders
    By LissaE in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 10 Mar 2010, 06:02 PM
  3. Paypal IPN new orders not showing on Customers/Orders page
    By daelan in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 1 Feb 2010, 02:23 AM
  4. PayPal IPN - Double Posting of sale No Admin Listing
    By Jandor in forum Built-in Shipping and Payment Modules
    Replies: 13
    Last Post: 22 Feb 2008, 03:47 PM
  5. Orders not showing up in Paypal or ZC admin (PayPal IPN module)
    By Edgar in forum Managing Customers and Orders
    Replies: 70
    Last Post: 20 Nov 2007, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR