Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Duplicate PayPal orders (one blank)

Duplicate PayPal orders (one blank)

Locked

Views: 5,334

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
29 Sep 2007, 10:24 PM
#1
daza4 avatar

daza4

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Duplicate PayPal orders (one blank)

Hi everyone,

Hoping someone can help before I pull all of my hair out! Using latest version of Zencart with Jul07 PayPal patch installed. Problem I am having is that whenever a customer orders by PayPal I get two orders added to the database - the first one is blank (only customer details; no products) and the second (which appears a few seconds later) does have the products on. Someone paid by echeck earlier today and that one only appears once but blank (may be a different problem?). I also don't seem to get any orders at all listed under the Custmers -> PayPal IPN in admin (not sure if I should see the orders there or not, but it's always empty).

No modules installed except a sales report tool downloaded from the contrib section.

Does anyone have any ideas - it's driving me mad. Here are the IPN logs from a sample order (each transaction appears to have 3 log files - not sure if that is relevant):

Sep 29 2007 22:43 -- Keys for submission: Array
(
[bn] => zencart
[cmd] => _ext-enter
[rm] => 2
[mrb] => R-6C7952342H795591R
[pal] => 9E82WJBKKGPLQ
[page_style] => Primary
[lc] => GB
[custom] => zenid=9lb5nd63p1tgps74lf86cj6mk7
[charset] => iso-8859-1
[return] => https:///index.php?main_page=checkout_process&referer=paypal
[cancel_return] => https://
/index.php?main_page=checkout_payment
[shopping_url] => https:///index.php?main_page=shopping_cart
[notify_url] => https://
/ipn_main_handler.php
[redirect_cmd] => _xclick
[business] => ***
[first_name] => ***
[last_name] => ***
[address1] => ***
[city] => ***
[state] => 0
[zip] => ***
[country] => GB
[email] => ***
[H_PhoneNumber] => ***
[night_phone_b] => ***
[day_phone_b] => ***
[no_shipping] => 1
[currency_code] => GBP
[paypal_order_id] =>
[item_name] => *** Purchase
[item_number] => Store Receipt
[upload] => 1
[amount] => 4.00
[shipping] => 0.00
[tax] => 0.00
[tax_cart] => 0.00
)

Sep 29 2007 22:43 -- IPN PROCESSING INITIATED.
*** Originating IP: 66.211.170.66 notify.paypal.com

Sep 29 2007 22:43 -- IPN NOTICE :: ipn_application_top -> language files okay

Sep 29 2007 22:43 -- IPN INFO - POST VARS received (sorted):
Array
(
[business] => ***
[charset] => windows-1252
[custom] => zenid=9lb5nd63p1tgps74lf86cj6mk7
[first_name] => ***
[item_name] => *** Purchase
[item_number] => Store Receipt
[last_name] => ***
[mc_currency] => GBP
[mc_fee] => 0.34
[mc_gross] => 4.00
[notify_version] => 2.4
[payer_business_name] => ***
[payer_email] => ***
[payer_id] => 3J858QPYKJ8UW
[payer_status] => unverified
[payment_date] => 14:43:22 Sep 29, 2007 PDT
[payment_fee] =>
[payment_gross] =>
[payment_status] => Completed
[payment_type] => instant
[quantity] => 1
[receiver_email] => ***
[receiver_id] => X4WJWPNH2B3TG
[residence_country] => GB
[shipping] => 0.00
[tax] => 0.00
[txn_id] => 3D7693465T4665109
[txn_type] => web_accept
[verify_sign] => AUkau1FwogE3kL3qo1vGTARqlijQA0MeACrk2sGzjhduw7lx8LQAPG8E
)

Sep 29 2007 22:43 -- IPN INFO - POST VARS to be sent back for validation:
To: www.paypal.com:80
POST /cgi-bin/webscr HTTP/1.1
Host: www.paypal.com
Content-type: application/x-www-form-urlencoded
Content-length: 739
Connection: close

Array
(
[payment_date] => 14:43:22 Sep 29, 2007 PDT
[txn_type] => web_accept
[last_name] => ***
[residence_country] => GB
[item_name] => *** Purchase
[payment_gross] =>
[mc_currency] => GBP
[business] => ***
[payment_type] => instant
[verify_sign] => AUkau1FwogE3kL3qo1vGTARqlijQA0MeACrk2sGzjhduw7lx8LQAPG8E
[payer_status] => unverified
[tax] => 0.00
[payer_email] => ***
[txn_id] => 3D7693465T4665109
[quantity] => 1
[receiver_email] => ***
[first_name] => ***
[payer_id] => 3J858QPYKJ8UW
[receiver_id] => X4WJWPNH2B3TG
[item_number] => Store Receipt
[payer_business_name] => ***
[payment_status] => Completed
[payment_fee] =>
[mc_fee] => 0.34
[shipping] => 0.00
[mc_gross] => 4.00
[custom] => zenid=9lb5nd63p1tgps74lf86cj6mk7
[charset] => windows-1252
[notify_version] => 2.4
[cmd] => _notify-validate
)

Sep 29 2007 22:43 -- IPN INFO - Confirmation/Validation response
SUCCESS

Sep 29 2007 22:43 -- Breakpoint: 1 - Collected data from PayPal notification

Sep 29 2007 22:43 -- IPN INFO :: Transaction email details.
From IPN = *** | ***
From CONFIG = ***

Sep 29 2007 22:43 -- Breakpoint: 2 - Validated transaction components

Sep 29 2007 22:43 -- Breakpoint: 3 - Communication method verified

Sep 29 2007 22:43 -- IPN NOTICE :: Could not find matched txn_id record in DB. Therefore is new to us.

Sep 29 2007 22:43 -- Breakpoint: 4 - Details: txn_type=unique ordersID = 0 IPN_id=0

Relevant data from POST:
txn_type = unique
parent_txn_id = None
txn_id = 3D7693465T4665109

Sep 29 2007 22:43 -- Breakpoint: 5 - Transaction type (txn_type) = unique

Sep 29 2007 22:43 -- IPN INFO :: Currency/Amount Details:
PayPal email address = ***
| mc_currency = GBP
| submitted_currency = GBP
| order_currency = GBP
| mc_gross = 4.00
| converted_amount = 4.00
| order_amount = 4

Sep 29 2007 22:44 -- IPN INFO - POST VARS to be sent back for validation:
To: www.paypal.com:80
POST /cgi-bin/webscr HTTP/1.1
Host: www.paypal.com
Content-type: application/x-www-form-urlencoded
Content-length: 101
Connection: close

Array
(
[cmd] => _notify-sync
[tx] => 3D7693465T4665109
[at] => Rj-31**********bM-mq
)

Sep 29 2007 22:44 -- IPN INFO - Confirmation/Validation response
SUCCESS

Sep 29 2007 22:44 -- PDT Returned Data Array
(
[payment_date] => 14:43:22 Sep 29, 2007 PDT
[txn_type] => web_accept
[last_name] => ***
[residence_country] => GB
[item_name] => *** Purchase
[payment_gross] =>
[mc_currency] => GBP
[business] => ***
[payment_type] => instant
[payer_status] => unverified
[tax] => 0.00
[payer_email] => ***
[txn_id] => 3D7693465T4665109
[quantity] => 1
[receiver_email] => ***
[first_name] => ***
[payer_id] => 3J858QPYKJ8UW
[receiver_id] => X4WJWPNH2B3TG
[item_number] => Store Receipt
[payer_business_name] => ***
[payment_status] => Completed
[payment_fee] =>
[mc_fee] => 0.34
[shipping] => 0.00
[mc_gross] => 4.00
[custom] => zenid=9lb5nd63p1tgps74lf86cj6mk7
[charset] => windows-1252
)

Sep 29 2007 22:44 -- IPN INFO :: Transaction email details.
From IPN = *** | ***
From CONFIG = ***

Sep 29 2007 22:44 -- IPN INFO :: Currency/Amount Details:
PayPal email address = ***
| mc_currency = GBP
| submitted_currency = GBP
| order_currency = GBP
| mc_gross = 4.00
| converted_amount = 4.00
| order_amount = 4

Sep 29 2007 22:44 -- PDT NOTICE :: Order added: 27
PayPal status: Completed @ 14:43:22 Sep 29, 2007 PDT
Trans ID:3D7693465T4665109
Amount: 4.00 GBP

I've had a thorough Google, checked the FAQ's etc and tried everything I have come across (including installing/uninstalling the module, and the Express module as per the patch instructions).

Anyone any ideas?

Thanks in advance!

7 Nov 2007, 2:02 PM
#2
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Duplicate PayPal orders (one blank)

I'm also having the same problem.

When paying for the order using PayPal 2 orders will appear in the admin.

The first order will have no product/item details, but it will include the customer details, tax, sub-total and total values. This order will not be processed by PayPal.

The second order will be fine. It contians all of the details and is also processed by PayPal.

The time between both orders being 'placed' is only 10 seconds!

Anyone able to help please?

28 Oct 2008, 7:27 PM
#4
robbie_79 avatar

robbie_79

New Zenner

Join Date:
Oct 2008
Location:
Netherlands
Posts:
26
Plugin Contributions:
0

Re: Duplicate PayPal orders (one blank)

Hi,

I know this is an old thread, but its exactly describing my problem: After a Paypal order, I receive 2 orders.

By following the links given in this topic, you will find similar topics in the Zen forum, and non of them get solved in the end.

I submitted a support ticket at Paypals' support center. That conversation ended with the suggestion to ask the ZenCart community for support.

Probably the reason for receiving 2 orders is because of a late response of ipn_main_handler.php
Can anyone offer any help in order to solve this issue?
cheers :wink:

28 Oct 2008, 9:46 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Duplicate PayPal orders (one blank)

You might experience some relief if you turn off the PDT Token option in your Zen Cart admin (leave it blank)

29 Oct 2008, 4:05 PM
#6
robbie_79 avatar

robbie_79

New Zenner

Join Date:
Oct 2008
Location:
Netherlands
Posts:
26
Plugin Contributions:
0

Re: Duplicate PayPal orders (one blank)

Thank you for your reply.

Removing the PDT token leaves me with only the empty order. The second (real) order is not created.

To me it feels like the first order should not be created at all, but only the second order which is created after paypal received the HTTP 200.

Is there a way to prevent the script to create the first order?
Or maybe even better, maybe the first order should be updated after it receives paypals IPN?

29 Oct 2008, 6:18 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Duplicate PayPal orders (one blank)

Zen Cart normally only creates one order record, and with PayPal Website Payments Standard that occurs when the IPN is received from PayPal.
I'm not sure why your site is operating differently.
As mentioned, I've heard reports of a few people encountering duplicates after enabling the PDT feature. Turning it off in their case resolved the matter.

28 Jan 2009, 10:16 PM
#8
babyface avatar

babyface

New Zenner

Join Date:
Jan 2007
Posts:
26
Plugin Contributions:
0

Re: Duplicate PayPal orders (one blank)

DrByte:

Zen Cart normally only creates one order record, and with PayPal Website Payments Standard that occurs when the IPN is received from PayPal.
I'm not sure why your site is operating differently.
As mentioned, I've heard reports of a few people encountering duplicates after enabling the PDT feature. Turning it off in their case resolved the matter.

We were having the same issue as the previous poster when we were hosting our site on a windows server; however, we recently moved to linux server and now we're getting two complete orders when a customer pays using Paypal IPN to pay.

28 Jan 2009, 10:39 PM
#9
babyface avatar

babyface

New Zenner

Join Date:
Jan 2007
Posts:
26
Plugin Contributions:
0

Re: Duplicate PayPal orders (one blank)

Okay, we went ahread and removed the PDT feature and it seems to be creating only one order now. I guess the issue may be with Windows servers.