Jump to content
Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

If I understand you right and you are testing on Sandbox...you will not get a confirmation email from PayPal. That is why they have the email section to show you that you WOULD have received one. If you go to the email section in the when you sign on you can see what emails WOULD have been sent. I read on the site they do this so that you don't accidentally confuse them for a real order. Now if you still aren't getting one from PayPal when things are live and you are not in SandBox, then Terra is your girl.

Best Wishes

Teresa

Share this post


Link to post
Share on other sites
If I understand you right and you are testing on Sandbox...you will not get a confirmation email from PayPal. That is why they have the email section to show you that you WOULD have received one. If you go to the email section in the when you sign on you can see what emails WOULD have been sent. I read on the site they do this so that you don't accidentally confuse them for a real order. Now if you still aren't getting one from PayPal when things are live and you are not in SandBox, then Terra is your girl.

Best Wishes

Teresa

 

Hi Teresa -

 

My issue is that PayPal is not returning an IPN to the site and no updates (stock, order status, etc.) are occuring. I should be able to test the IPN through the sandbox, shouldn't I?

 

As was recommended a bit earlier in this thread, I added some debugging code to the top of the ipn.php file that sends an email to me whenever the file is accessed. I tested the code by calling the file in the browser and it sends out the debugging email as expected. However, I don't receive this same email after PayPal processes a transaction. I am therefore assuming PayPal is never accessing the file??

 

 

Thanks for the feedback!

 

R

Share this post


Link to post
Share on other sites
Hi Teresa -

 

My issue is that PayPal is not returning an IPN to the site and no updates (stock, order status, etc.) are occuring. I should be able to test the IPN through the sandbox, shouldn't I?

 

As was recommended a bit earlier in this thread, I added some debugging code to the top of the ipn.php file that sends an email to me whenever the file is accessed. I tested the code by calling the file in the browser and it sends out the debugging email as expected. However, I don't receive this same email after PayPal processes a transaction. I am therefore assuming PayPal is never accessing the file??

Thanks for the feedback!

 

R

 

I figured I misunderstood, because you sound much smarter than me in these matters. If it makes you feel any better, I don't get any emails accept the EXTRA, my customers don't get one and my shopping cart likes to populate itself. I will take my foot out of my mouth and let the more informed Gurus help you. Sorry I interrupted the discussion.

Teresa

Share this post


Link to post
Share on other sites
I figured I misunderstood, because you sound much smarter than me in these matters. If it makes you feel any better, I don't get any emails accept the EXTRA, my customers don't get one and my shopping cart likes to populate itself. I will take my foot out of my mouth and let the more informed Gurus help you. Sorry I interrupted the discussion.

Teresa

 

Not at all Teresa - I really appreciate your input! I don't think it is so much that you misunderstood me as that I am really struggling to describe my predicament succinctly - due to the fact that I understand so little of what is happening 'under the hood'. I apologize if I sounded dismissive or grumpy.

 

Again, I really appreciate the response and I wish you luck with that scary session-cross-cart-population issue! - WHOOF! :D

Share this post


Link to post
Share on other sites
Not at all Teresa - I really appreciate your input! I don't think it is so much that you misunderstood me as that I am really struggling to describe my predicament succinctly - due to the fact that I understand so little of what is happening 'under the hood'. I apologize if I sounded dismissive or grumpy.

 

Again, I really appreciate the response and I wish you luck with that scary session-cross-cart-population issue! - WHOOF! :D

Do you have a dedicated IP address?


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.

Share this post


Link to post
Share on other sites
Do you have a dedicated IP address?

 

I just shot an email to my ISP and they confirmed the following:

 

- Dedicated IP Address: Yes

 

- Proxy Server: No

 

Does this give us anything?

 

Thanks,

 

R

Share this post


Link to post
Share on other sites
I just shot an email to my ISP and they confirmed the following:

 

- Dedicated IP Address: Yes

 

- Proxy Server: No

 

Does this give us anything?

 

Thanks,

 

R

It sounds like the button code worked ok and you received payments but IPN responses. The $parameter['notify_url'] which set to the file catalog/ext/modules/payment/paypal_ipn/ipn.php seemed not reachable since you didn't receive the email you added at the top. I thought you were testing in a local host behind some firewall or IP sharing which can cause similar problem.

 

Please check your paypal account profile and try not to set anything in the Instant Payment Notification.

Edited by AlexStudio

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.

Share this post


Link to post
Share on other sites
It sounds like the button code worked ok and you received payments but IPN responses. The $parameter['notify_url'] which set to the file catalog/ext/modules/payment/paypal_ipn/ipn.php seemed not reachable since you didn't receive the email you added at the top. I thought you were testing in a local host behind some firewall or IP sharing which can cause similar problem.

 

Please check your paypal account profile and try not to set anything in the Instant Payment Notification.

 

 

I am so ashamed to have to admit this!

 

The IPN wasn't making it back to the store because I password protected (htaccess) the entire catalog directory! :blush:

 

I did this because the store isn't live yet and I didn't want anyone accessing it - but I apparently think in such tiny pieces that I never put it together that I was silently blocking the post. As a test, I wrote an html page with a form that posted to the ipn.php file. When I was hit with the login request, it finally clicked.

 

I moved the login down to the admin directory and the contribution is functioning tip top, as advertised.

 

Thanks for all of your help and patience!

 

I am a monkey.

Share this post


Link to post
Share on other sites

Hi,

 

Just a note for people finding error 3005 (useless general error from PayPal) - make sure you are attempting to pay (in the module) a VALID email address, because if you're not, both live and sandbox will throw up 3005 error when you try to login as a paypal user to complete payment.

 

Hope that saves someone some time :)

 

(This isn't a fix for all instances of 3005 obviously, but is one thing to check)

Edited by luthernz

Share this post


Link to post
Share on other sites

The Paypal IPN seems to pass the name of my OSCOMMERCE shop as the item/Product purchased.

 

Does anyone know how to edit this variable, I'd like to change it to something more generic cuch as "shop product".

 

Any feedback would be appreciated.

 

Thanks,

 

Rob.

Share this post


Link to post
Share on other sites

I seem to be having problems with the IPN notifications and updating the order/creating the order email.

 

I have put error_log debug into the ipn.php that paypal calls and it seems to be getting called, but getting stuck at the same point all the time.

 

Extract from the log:

[14-Feb-2007 06:36:33] Paypal payment creating order

[14-Feb-2007 06:36:33] Paypal payment created order 59

[14-Feb-2007 06:37:01] Paypal payment updating order 59

[14-Feb-2007 06:40:13] IPN Callback running : invoice number 59 customer 23

[14-Feb-2007 06:40:43] IPN Callback requesting verification

[14-Feb-2007 06:40:44] IPN Callback received verification : VERIFIED

[14-Feb-2007 06:40:44] invoice check complete

[14-Feb-2007 06:40:45] IPN Callback running : invoice number 59 customer 23

[14-Feb-2007 06:41:15] IPN Callback requesting verification

[14-Feb-2007 06:41:16] IPN Callback received verification : VERIFIED

[14-Feb-2007 06:41:16] invoice check complete

[14-Feb-2007 06:41:27] IPN Callback running : invoice number 59 customer 23

[14-Feb-2007 06:41:58] IPN Callback requesting verification

[14-Feb-2007 06:41:58] IPN Callback received verification : VERIFIED

[14-Feb-2007 06:41:58] invoice check complete

 

so it seems to be getting 3 ipn callbacks from paypal, each one getting stuck at the same point.

 

if we look at the ipn.php code you can see it's getting stuck when checking if the order exists in the table and just hanging there

 

  if ($result == 'VERIFIED') {
   if (isset($_POST['invoice']) && is_numeric($_POST['invoice']) && ($_POST['invoice'] > 0)) {
error_log("invoice check complete");
     $order_query = tep_db_query("select currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . $_POST['invoice'] . "' and customers_id = '" . (int)$_POST['custom'] . "'");
     if (tep_db_num_rows($order_query) > 0) {
  	error_log("order check complete");
       $order = tep_db_fetch_array($order_query);

 

i've looked at mysql and run the sql statement myself, and it all works. the php _should_ work.

 

Sometimes it does work, which is even more puzzling. There seems to be no pattern as to when it will or won't work. Perhaps it could be something to do with the server load at my ISP ?

 

Does anyone have any ideas?

Share this post


Link to post
Share on other sites

Hello,

 

I have a small bug but anoying with the osCommerce PayPal IPN Module v1.0 For 2.2MS2, when I use it to pay something in euro their is still the dollar sign on the ligne Products, but the price is in euro, it's written $14.00 instead of 14.00€.

 

Do you know something about it?

Share this post


Link to post
Share on other sites
Hello,

 

I have a small bug but anoying with the osCommerce PayPal IPN Module v1.0 For 2.2MS2, when I use it to pay something in euro their is still the dollar sign on the ligne Products, but the price is in euro, it's written $14.00 instead of 14.00€.

 

Do you know something about it?

 

Hi There,

We recently migrated from one server to another within the same webhost. The old version was using PHP4, the new is PHP5. The problem is, while People can place orders and pay just fine, the IPN responses never seem to make it back, so orders are stuck in Pending[PayPal IPN] until I have the time to manually confirm that we received payment. The error email I got from paypal is as follows.

$_POST:


$_GET:

Any idea at all?

The url is www.nitroairsoft.com

Share this post


Link to post
Share on other sites
We recently migrated from one server to another within the same webhost. The old version was using PHP4, the new is PHP5.
The PayPal IPN has been written for PHP4. If you are using PHP5 you will need to upgrade the code. As my PHP5 skills are zero this is unfortunately not something I can take on myself as a contrib update but any help from other developers on this forum would be greatly appreciated. Sorry, 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 **

Share this post


Link to post
Share on other sites
The Paypal IPN seems to pass the name of my OSCOMMERCE shop as the item/Product purchased. Does anyone know how to edit this variable, I'd like to change it to something more generic cuch as "shop product".

Hi Rob - in paypal_ipn.php find this line

$parameters['item_name'] = STORE_NAME;

and change to whatever you want. If your shop only uses one language, then you can just hardcode it into the file directly (e.g. = 'my text';). Otherwise enter a constant (e.g. MYTEXT) and then define it in the language level paypal_ipn.php file. Hope this explains it - 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 **

Share this post


Link to post
Share on other sites
I have a small bug but anoying with the osCommerce PayPal IPN Module v1.0 For 2.2MS2, when I use it to pay something in euro their is still the dollar sign on the ligne Products, but the price is in euro, it's written $14.00 instead of 14.00€.

The PayPal IPN takes the currency from your shop's setting. Check your settings under "Localisation -> Currency". 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 **

Share this post


Link to post
Share on other sites

I had to add "$currency = $order_db['currency'];" after

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment(paypal_ipn);

 

in ipn.php

 

so that the mail is well written, because for strange reason the currency is set to dollars every time in this file (ipn.php).

 

I set the default currency to euros but this didn't change anything.

Share this post


Link to post
Share on other sites

Hi Can anyone tell me why IPN always redirects costumers to the french Paypal payment platform even if he is English user?

Share this post


Link to post
Share on other sites

I am having a problem with the way PayPal is working with my site. I am receiving PayPal payments from registered customers, but there are no orders in the administration area. I have tested the site previously, both in sandbox and the live site, without problems. Also, if I login as a customer and prepare a test order (without completing through PayPal) the order does show up in the database. What is going on here? I am currently using IPN v1.1 - will upgrade soon!

Share this post


Link to post
Share on other sites

POTENTIALLY BIG ISSUE (IF NOT SPOTTED ALREADY THAT IS ;) ):

 

Anyone else finding that if a customer removes items from their cart during the confirmation stages the order still shows in the admin interface even though the customer hasn't yet gone through to payment and have an empty shopping cart.

 

I've had a search for this one but couldn't find a trace of it - I know another shop owner who has had the same issue so I imagine this is quite common.

 

Anyone point me in the direction of the fix???

 

Cheers...

Share this post


Link to post
Share on other sites
POTENTIALLY BIG ISSUE (IF NOT SPOTTED ALREADY THAT IS ;) ):

Anyone else finding that if a customer removes items from their cart during the confirmation stages the order still shows in the admin interface even though the customer hasn't yet gone through to payment and have an empty shopping cart.

Your "potentially big problem" is the IPN pre-save function. It's a necessary feature to ensure that the order is captured should the customer not return from PayPal. I recommend reading the user guide which tells you how to spot unpaid orders and what to do. I'm not sure what you mean therefore by "searched everywhere" - the user guide (included in the download contrib package) has full information.

 

If you don't want to pre-save unpaid orders just use the standard Paypal module. But be warned that without pre-saving orders you won't have any order records should the customer not return from PayPal. 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 **

Share this post


Link to post
Share on other sites
Your "potentially big problem" is the IPN pre-save function. It's a necessary feature to ensure that the order is captured should the customer not return from PayPal. I recommend reading the user guide which tells you how to spot unpaid orders and what to do. I'm not sure what you mean therefore by "searched everywhere" - the user guide (included in the download contrib package) has full information.

 

If you don't want to pre-save unpaid orders just use the standard Paypal module. But be warned that without pre-saving orders you won't have any order records should the customer not return from PayPal. all the best - Terra

 

I think this is quite unintuitive bahaviour. I am very appreciative of the contribution as this situation is better than the order not being recorded at all. However, if a customer removes everything from their shopping cart, the order should be removed. I shall endeavour to add a contribution to help others to this end. Stay tuned...

 

I tried searching for this particular scenario (being well aware of the pre-save functionality) and stated that I had already tried looking around to try and avoid any snooty/sarcastic responses that are commonplace on forums ("read the manual!", "please search before you post!" etc etc)... ah well.

Share this post


Link to post
Share on other sites
I think this is quite unintuitive bahaviour. I am very appreciative of the contribution as this situation is better than the order not being recorded at all. However, if a customer removes everything from their shopping cart, the order should be removed. I shall endeavour to add a contribution to help others to this end. Stay tuned...

 

I tried searching for this particular scenario (being well aware of the pre-save functionality) and stated that I had already tried looking around to try and avoid any snooty/sarcastic responses that are commonplace on forums ("read the manual!", "please search before you post!" etc etc)... ah well.

If I come across as sarcastic that's because there's quite a lot of queries and whilst some do read the user guide, others just post a question so my first defence is always to say "read the user guide". Once that's out of the way we can move on.

 

As for deleting the order when emptying basket - I'm not sure how you can do this as basket & orders are two different elements within the shop and you'd have to link the empty basket command with deleting a specific order id. Also don't forget that if a customer pays via PayPal and then returns later, their basket will still be full, so deleting the order would delete a paid order. Monica's "empty basket fix" only works once session is timed out (empty basket fix deletes entry in database but can't empty a session variable).

 

The current contribution set-up allows the shop owner to make an informed decision - any order can be deleted quickly with one click in admin but it's the shop owners decision as to whether an order is paid or unpaid.

 

If you do write your own contrib please keep it separate to the main PaypPal IPN (you can of course use this code as basis - it's GNU). I think the key test scenario would be this:

1. customer pays at PayPal but does not return

2. After a few minutes, customer decides to go back to the shop - session is still live, so the empty basket fix won't work - basket will still be full based on session variables

3. Customer empties basket (however the order in admin is paid)

 

I know it's not a likely scenario but when dealing with a delete function you have to be 100% sure that anything deleted is no longer needed.

 

I know this IPN isn't userfriendly but believe me if there was a different way, I'd have taken it a long time ago. The only other option is Express checkout. Of course, an optimist may hope that PayPal actually fixes their checkout procedure to something where customers actually return from PayPal but I'm not holding my breath. PayPal's only saving grace is that they are cheap & easy to set up. As for anything else they are way behind their competition and this whole checkout mess just proves my point - no other payment gateway provider has this problem. Not SECPay. Not Protx. Not WorldPay. Not HSBC. Not Barcalys. Only PayPal.

 

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 **

Share this post


Link to post
Share on other sites

Hi

 

I am updating from version 1.4

and have this error on checkout confirmation:

 

1054 - Unknown column 'orders_status_id' in 'field list'

 

insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('4781', '100002', now(), '0', '')

 

any ideas

thanks

carl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×