Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

ARE PAYPAL SERVERS CRAZY ???

 

I havent changed anything in my oscommerce store recently. Everything was working fine (I have paypal ipn 2.2, QTpro 4 contribs).

And since yesterday, it seems that paypal servers are bugging, because some of my customers orders (payed with paypal) seem to pass 2 or 3 times through ipn.php >> the order is recorded once, but I receive 2 or 3 times the confirmation email, and my stock is updated 2 or 3 times too >> I can have a negative stock, I have to update it manually after receiving the emails.

 

What happened ? Did anybody meet the same problems yesterday or today ?

 

thanks

Link to comment
Share on other sites

ARE PAYPAL SERVERS CRAZY ???

 

I havent changed anything in my oscommerce store recently. Everything was working fine (I have paypal ipn 2.2, QTpro 4 contribs).

And since yesterday, it seems that paypal servers are bugging, because some of my customers orders (payed with paypal) seem to pass 2 or 3 times through ipn.php >> the order is recorded once, but I receive 2 or 3 times the confirmation email, and my stock is updated 2 or 3 times too >> I can have a negative stock, I have to update it manually after receiving the emails.

 

What happened ? Did anybody meet the same problems yesterday or today ?

 

thanks

Link to comment
Share on other sites

I am a newby to osCommerce. I downloaded and installed the files to the folders as indicated in the v2.2 for 2.2MS2 instructions. My site is organized with a web folder at the root, the osc folder subordinate to that, and I created the folder ext subordinate to the osc folder. I created the remaining new folders \ext\modules\payment\paypal_ipn and copied the paypal_ipn.php file to that folder. I copied the other files to their appropriate includes\languages folders. I uninstalled the PayPal module in Payment Modules but there is no additonal entry for the PayPal IPN module. Is there supposed to be a separate entry to install and configure? Thanks.

 

I found it now. It is labeled "Credit/Debit Card (via PayPal)"

Link to comment
Share on other sites

There's 122 pages of comments. It would be more confusing than helpful to read through all of these comments. My question is... is there a final paypal ipn contribution or do you think there will be more changes? If there is a final may i please be linked to it?

 

Thanks for your time.

Link to comment
Share on other sites

Please, don't use the [codebox] tag, use [code] tag instead. It's very difficult to read and to compare your code with the original.

 

The variable $products_ordered is in the 'completed' loop, and it is generated with the stock updating code. You can't use it outside the 'completed' loop without re-witting the stock updating code.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Tera:

My problem is I am not receiving the initial order email when payment is by PayPal. The customer doesn't get one either.

 

I have my error log entries here from the debug /ext/modules/payment/paypal_ipn/ipn.php:

[sun Apr 1 18:10:40 2007] [error] PP TEST start

[sun Apr 1 18:10:40 2007] [error] PP TEST PayPal is accessing the ipn file

[sun Apr 1 18:10:40 2007] [error] PP TEST we have successfuly loaded application top and language file

[sun Apr 1 18:10:40 2007] [error] PP TEST we are assembling the reply: cmd=_notify-validate

[sun Apr 1 18:10:40 2007] [error] PP TEST PayPal server is www.paypal.com

[sun Apr 1 18:10:40 2007] [error] PP TEST option3 - fsocket is true, port 80

[sun Apr 1 18:10:40 2007] [error] PP TEST fp is okay

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we start to send string

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 we receive PayPal reply

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 REPLY: INVALID

[sun Apr 1 18:10:40 2007] [error] PP TEST result is NOT VERIFIED

[sun Apr 1 18:10:40 2007] [error] PP TEST end

 

Can you give me any hint what is going wrong?

 

Thanks, Dennis

Link to comment
Share on other sites

.....

[sun Apr 1 18:10:40 2007] [error] PP TEST we are assembling the reply: cmd=_notify-validate

....

[sun Apr 1 18:10:40 2007] [error] PP TEST option1+3 REPLY: INVALID

Dennis - as the error log shows the string you send to PayPal is empty - meaning you do not receive any POST variables from PayPal. The first variable (notify_validate) is in the file, but all POST variables are missing. The POST variables are processed by this code:

 

foreach ($_POST as $key => $value) {
$parameters .= '&' . $key . '=' . urlencode(stripslashes($value));
 }

and in your case this is completely empty, meaning that PayPal cannot verify your site & update fails. Normally the string would look look like this: "cmd=_notify-validate&payment_date= .. ".

 

NB: $_POST was introduced in PHP 4.1.0. In earlier versions, use $HTTP_POST_VARS. I'd advise to check your PHP version (look under Tools -> Server Info) and if your are on an ancient PHP version lower than 4.1 you will have to replace all occurrences of $_POST with $HTTP_POST_VARS.

 

Please let the thread know how you get on! all the best Terra

Edited by Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

My question is... is there a final paypal ipn contribution or do you think there will be more changes? If there is a final may i please be linked to it?
There will be an update as there have been various bug fixes posted on this thread over the last weeks. The last version 1.x is nice & stable, so if in doubt go with this one. Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

Please let the thread know how you get on! all the best Terra

 

 

Terra:

 

I am running Apache/1.3.33 (Unix) PHP/4.4.2 (Zend: 1.3.0) mod_ssl/2.8.24 OpenSSL/0.9.7e-p1

 

For the heck of it I tried replacing $_POST with $HTTP_POST_VARS and got exactly the same error messages in my log.

 

The baffling part is I was using $Id: ipn.php,v 1.1.2.8 2004/12/07 15:46:08 hpdl Exp $ and everything worked fine except I did not have an Order # in the inital email message when payment was via PayPal. The problem began when I tried to correct that problem with this contribution:

http://www.oscommerce.com/community/contri...der+Status+v1.5

 

This was the only change for that addon, In: catalog/includes/modules/payment/paypal_ipn.php

Changed this:

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

To this:

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT_1 . ' ' . $order_id . ' ' .EMAIL_TEXT_SUBJECT_2 , $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

I just can't see how that would cause my problem.

 

I'll keep muddling along but should you or anyone have an idea or suggestion please post here. If I solve the problem I will also post here.

 

Dennis

Link to comment
Share on other sites

Hi Dennis - Try modifying the code like this:

foreach ($_POST as $key => $value) {
error_log('PP TEST received POST variable: ' . $key . ' : ' . $value);
$parameters .= '&' . $key . '=' . urlencode(stripslashes($value));
 }

and then check your error log to see if you have received any $_POST variables.

 

Another thing which I don't quite understand on your server is why neither OpenSSL nor cURL are available - the script tried for both but ended up using the default port 80 ftp connection ... normally on most decent servers I'd expect OpenSSL to be compiled into PHP (port 443 accessible) and cURL to be available. But in your case the error log clearly shows that neither are available ("PP TEST option3 - fsocket is true, port 80").

 

PS: I can't see how the order id mod could have caused the problem - if in doubt, uninstall & roll back but I can't see any obvious connection.

 

all the best - Terra

Edited by Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

maybe im missing it but where do you get the information for the 4 certificate/key fields?

 

also, when you do this aggregate, do you know the exact products/attributes ordered when you check the admin order panel? because i notice on the payment screen the description is just 'oscommerce'

Edited by shellyky
Link to comment
Share on other sites

Password protected site/folder

(ref "Generic Guide - if ipn.php is not updating the order"

http://www.oscommerce.com/forums/index.php?sho...17&st=2032)

 

Assumed

-"register globals" is enabled

-port 80 or 443 for PHP is enabled

-proxy server: no proxy server or IP address provided and applied

-ipn.php file in the correct directory

 

Sometimes users limit access to the their store, (for restricted membership, or in case of tests)

If you have protected your site with .htaccess .htpasswd, please note the following scenario:

-You log in your store, add an item to your cart, go to checkout, go to paypal and your payment is successful.

-You return back to your store to the "checkout success" page #

However:

-No order email has been sent

-Stock is not updated

-Order status is not updated

-Debug email (if set in ipn.php) not received

 

Even if you have made the payment successful, received the confirmation email from PayPal

and returned back to the "success page", you can't receive the IPN notification from PayPal.

 

PayPal can't access your site because of your .htaccess file.

However NO error is displayed regarding the notification failure.

This is why you don't receive Debug email from ipn.php

 

Pheraps it seems a very rare case, but I hope it can help.

Link to comment
Share on other sites

UNBELIEVABLE!!

 

Sandbox test worked perfectly: $Id: ipn.php,v 1.1.2.8 2004/12/07 15:46:08 hpdl Exp $

 

Dennis

 

Terra & interested parties:

 

I have reverted back to

$Id: ipn.php,v 1.1.2.8 2004/12/07 15:46:08 hpdl Exp $

 

I'll wait for the next PayPal order to see what happens.

Link to comment
Share on other sites

Dennis, the code in ipn.php which communicates with PayPal is identical since v1.1. It must be something else.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

That is interesting. I'll have to do some more testing.

 

Thank you for reminding me of that.

 

Dennis

 

Dennis, the code in ipn.php which communicates with PayPal is identical since v1.1. It must be something else.
Link to comment
Share on other sites

Hello,

 

I have read this thread into my eyes popped out and searched the entire forum for this. I found a few items but nothing exact. If this answer is included in this thread, I do aplogize but I didn't see it.

 

We had a total of 4 orders and the results are:

 

3 orders NOT in oscommerce -- Unverified, Unregistered Paypal users

 

1 order that did go into oscommerce -- Verified & Registered Paypal member.

 

It's a trend and appears that unverified orders aren't showing in OS Commerce.

 

Any advice on this?

Jason Miller

www.jamz.net

Link to comment
Share on other sites

Okay - the best way to tackle is this via your error log.
Any advice on this?

Please refer to my error log debug file in the post referenced above (one page before this post) and reply back with the outcome. Without a proper debugging method it's all guesswork so please take a look at my post & file and then we should be able to help you further. all the best - Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

Terra:

 

Does this look correct? This from the debug email not the httpd-access.log. There is nothing in the error log. Nothing after $_GET. Is that right?

 

In addition, I now know I do nor have curl installed on my server. Could that be causing my trouble? It's simple enough to install and I will do that on your recommendation. Let me know at your convenience.

 

P.S.

I visited your website http://www.terranetwork.net/ and I must say I was really quite impressed. It looks like you have a terrific operation. I am a little bewildered by your total lack of self-promotion however. From what I saw I would not hesitate to favorably recommend your services. I have a question, do you offer your expertise for a fee to fix a problem like I am having (or had)? Perhaps even updating a servers operating system or parts thereof if required. I am just thinking that I could be doing something a lot more productive than learning and experimenting as I have been doing the last two days.

 

$_POST:

 

mc_gross=13.97

invoice=4786

address_status=confirmed

payer_id=GWGGGGGGGJ7CPQ

tax=0.00

address_street=5127 Ventura Drive

payment_date=07:58:02 Apr 05, 2007 PDT

payment_status=Pending

charset=windows-1252

address_zip=98215

first_name=Dennis

address_country_code=US

address_name=Shmeltzer Co.

notify_version=2.1

custom=7735

payer_status=verified

address_country=United States

address_city=California

quantity=1

verify_sign=AaUBi1GBU3DTxuJRwqpstHncxHOYahcn730a4j-xN0HGPTN-G

[email protected]

txn_id=0

payment_type=echeck

payer_business_name=Schmeltzer Co.

last_name=Nicholson

address_state=CA

[email protected]

pending_reason=unilateral

txn_type=web_accept

item_name=Schmeltzer Co. Inc.

mc_currency=USD

item_number=

residence_country=US

test_ipn=1

payment_gross=13.97

shipping=3.37

 

$_GET:

Link to comment
Share on other sites

That's a great module.

 

I have installed 2.2, and I don't know how it integrate with other modules, such as credit class & gift voucher 1.9 and osc affiliate. I find detailed intruction in V1.x, but not 2.x

Could someone help me about this?

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

That's a great module. :P

 

I have installed 2.2, and I don't know how it integrate with other modules, such as credit class & gift voucher 1.9 and osc affiliate. I find detailed intruction in V1.x, but not 2.x

Could someone help me about this?

Edited by shadow007

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

Hi all,

 

I noticed that 2 days ago, both my Paypal confirmations and Nochex (another payment processor) confirmations weren't authorising correctly.

The only change I can think of is that I'd installed Subversion (Version control) to the live directory tree.

(Basically I copied all the files in the live directory to another one. Made that the official repository, then immediately 'recreated' the live tree from the repository - if that makes sense)

 

Are there any temporary files or anything like that which need to be written somewhere by Paypal/Nochex IPNs that SVN might be clashing with?

I don't think it's an actual DB configuration change, as whatever it is knocked out proper confirmations for both Nochex AND Paypal at (I believe) the same time ...

Sorry for any terminology weirdness...

 

Any advice or suggestions would be very welcome =)

Edited by veral
Link to comment
Share on other sites

Sorry - just to add:

 

Paypal notifications now update to: "PayPal IPN Invalid [Completed] " *3, even when payment clears.

Nochex notifications now update to: "Nochex Processing" - again, even when payment clears (and before I got "Nochex Authorised")

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...