Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Hi, hope someone can help. I'm using an old IPN version 1.1. It's been working fine for 2 years so I've never had any reason to upgrade. From the 30th June I've noticed that when a customer clicks the 'Return to Merchant' button at paypal it now returns to the customer login screen rather than the checkout_success.php page. It never used to do this as it's always returned to the checkout success page. This in turn means that the customers cart isn't emptied and the order emails aren't sent. The IPN is still updating the order in admin to show that PayPal IPN Verified [ie. Completed (Verified; £1.99)

 

I haven't changed anything and was wondering if anyone else has experienced this? Maybe Paypal UK/Euro has changed something. The only thing I've noticed during test that might be different is that I receive a warning from Paypal when I click the 'Return to Merchant' button stating that I'm leaving a 'Secure site for a non secure site' would I like to continue. Clicking continue takes you back to the standard osCommerce customer logon screen. My site is very simple and deals in low value, low volume items. I have always relied on paypal to secure the payment process as I've never really felt the need to secure the whole process (be that right or wrong).

 

From reading the installation notes with IPN v1.1 (and the latest IPN version 2.2) it states that the order information (IPN) works with unsecured connections. And it has until now!!

 

Currently at Paypal I don't have the 'Auto Return' nor the IPN turned on as this has always been sent by the module and hasn't been a previous requirement (as per the modules install guide).

 

Be very grateful if someone could maybe cast an eye over my problem. Maybe I need to install v2.2. At least customer carts would be emptied. Would v2.2 cure my problem??

 

Hope you can help. Cheers MM.

 

Same problem here as well, with no clue as to how to fix it. My shop runs SSL and has had no problems with PayPal IPN up until now.

 

Thanks for any help.

Link to comment
Share on other sites

For anybody who posted problems about customers ending up on the log in page: This usually means that the session was lost (when customer returns, the shop does not know that customer has an active session & returns them to the log in screen).

 

For session problems, I'd need to know:

1. Do you have your own full SSL?

2. If yes to above, do you force cookie use? (usually, forcing cookie use cures session problems but this can only be done with full SSL Certs)

 

As to the queries regarding v1.x versus v2.x - version 2.x does update stock & send out emails even if a customer does not return to the shop, so it will help but it won't actually solve the issue of customers not seeing the checkout_success.php page.

 

I hope this helps a bit more - if you still have problems, please post back with the info I mentioned above. All the best - Terra

 

PS: also - things don't go wrong all of a sudden without any changes - please include the name of your hosting provider and any recent changes they have done to your server. If they did not tell you of any changes, open a support ticket with your hosting provider and ask them about any recent server upgrades/changes before posting back to this thread.

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

For anybody who posted problems about customers ending up on the log in page: This usually means that the session was lost (when customer returns, the shop does not know that customer has an active session & returns them to the log in screen).

 

For session problems, I'd need to know:

1. Do you have your own full SSL?

2. If yes to above, do you force cookie use? (usually, forcing cookie use cures session problems but this can only be done with full SSL Certs)

 

As to the queries regarding v1.x versus v2.x - version 2.x does update stock & send out emails even if a customer does not return to the shop, so it will help but it won't actually solve the issue of customers not seeing the checkout_success.php page.

 

I hope this helps a bit more - if you still have problems, please post back with the info I mentioned above. All the best - Terra

 

PS: also - things don't go wrong all of a sudden without any changes - please include the name of your hosting provider and any recent changes they have done to your server. If they did not tell you of any changes, open a support ticket with your hosting provider and ask them about any recent server upgrades/changes before posting back to this thread.

 

 

Thanks for the reply Terra. I've since installed the latest IPN v2.2. It's a massive improvement over v1.1 that I was using. As you've mentioned it fully updates my stock, admin and order emails regardless of what the customer does. Also cures the problem I found when using v1.1 where-by the customer is able to return before paying at paypal and amend the cart without updating the original 'preparing paypal IPN' status. Anyone who hasn't upgraded I fully recommend doing so. Well done Terra and thanks for a great contribution.

 

With regards to the session thingy. Now I've got v2.2 installed it's not such an issue. The only negative thing I've identified about the customer being re-directed to the login screen (rather than the checkout success) is that the customer comments aren't included in the customer/shop emails. This also isn't such an issue with v2.2 as you can see the comments in admin next to the IPN status. Still it would be nice to get everything working 100%.

 

I'm not a programmer but personally I think this could be an issue related to PayPal and the way they process returns. When I create an order and go to paypal I can click the return to merchant (before paying) and still return to the same session at my shop (ie. back to the payment selection screen, and still logged in as a customer). Only after paying do I get re-directed to the login screen. I might be wrong but this makes me think that if it was a session problem all re-directs from paypal would return to the login screen. The only visible difference at paypal is once you've paid and click return to merchant you get a warning (paypal pop-up) asking to confirm to return to a non-encrypted session, where as prior to paying and using the same return to merchant button you get no warning. What do you think??

 

In the meantime I'll check with my host to see if any changes have been made to my host server around/after 31st June 07 when this problem first started to happen. I have no SSL cert (shared or full) and didn't for 2years prior to this problem occurring. So forcing cookies isn't an option :-( Whatever changed has happened in the last 13 days, be that at my host or paypal, but certainly something had changed.

 

To all the others who have reported problems please could you advise if your cart was working originally and when it started to re-direct to customer login rather than checkout success. If it was 13 days ago then it seems a little to suss to be a coincidence.

 

I'll get back with what my host say. Cheers MM.

Link to comment
Share on other sites

Ok, a quick update. I just had this from my host.

 

quote:

 

There have not been any major changes to the Apache web server and the PHP module. Only small regular updates to the cPanel/WebHost Manager, but they do not affect the web service way of operation (this stays stable unless manually updated). We only update Apache/PHP when a new version of PHP is available to mitigate any security risks, and have been doing it gradually over the years with no complications.

 

This might have been a change in the way Paypal passes parameters to osCommerce scripts using the callback URL, we are not sure about this however. The way sessions operate with PHP and get stored at the server has not changed and we can't suggest any reasonable server related cause for the problem you experience.

 

end quote.

 

So from what my host says it looks like this is probably a PayPal issue in the way the IPN posts back to osC. Certainly would make sense since 3 users have now reported the same problem all occuring at about the same time in the last 2weeks. Also the session seems to remain (and keep alive) for return to merchant unless the payment is actually completed. Does the call back change after payment is completed? I haven't changed anything on my site, and have only yesterday upgraded to IPN v2.2 which also has the same return to merchant problem. This only started to happen on 1st of July after 2years of working perfectly.

 

Incidentally from 2 July 2007, a new PayPal company, PayPal (Europe) S.à r.l. & Cie, S.C.A. (PayPal Luxembourg), became the service provider for PayPal in the EU. I might be being paranoid but the dates do tie up to when the problems started to happen.

Link to comment
Share on other sites

Hey guys, something wierd's going on.

 

I use Paypal solely for my osCommerce website. Lately, some orders have been acting up in the sense that when I chnaged the order status to either processing or delivered, it goes back to pending within a few hours. I know it has something to do with the Paypal IPN because everytime it goes back to pending it gives me that Paypal payment notice, something like "PayPal IPN Verified [Completed (Unverified; $xxx.xx)] "

 

Anyone know what's wrong?

Link to comment
Share on other sites

Some more information.. bump

 

Lately, some of my orders have been acting wierd. After I changed their order status to processing or shipped, these wierd orders will bounce back to pending every few hours. If I put them back to their correct status, they'll go back to pending a few hours later - it's very annoying. Does anyone know what's making it do this?

 

FYI, all the wierd orders I'm talking about were paid via Paypal. The problem started with orders coming in from July 10th, but strangely, one of the orders on the 11th do not act this way.

 

Does anyone also know which PHP page has code that might be affecting this?

 

Please help, thanks!

Link to comment
Share on other sites

With regards to the session thing - I've got v2.2 installed and have a full ssl cert - host is 1and1.com

 

2 things

a) customer being re-directed to the login screen (rather than the checkout success)

B) i noticed when I go to my admin page - it says - You are not protected by a secure SSL connection.

 

any help would be appreciated....

Link to comment
Share on other sites

a customer being re-directed to the login screen (rather than the checkout success)

b i noticed when I go to my admin page - it says - You are not protected by a secure SSL connection.

Regarding b - that just means your admin is not locked down under SSL (a separate issue, not for this thread. I'm sure Vger has some advice in her easy install guide). As for a - have you tried setting force cookie use to TRUE? I'm not 100% sure but it should work on 1&1. Please try & see if that cures it. All the best - Tera

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

This support thread is for the osCommerce PayPal IPN Module v1.0 For 2.2MS2

 

Which can be downloaded from http://www.oscommerce.com/community/contributions,2679

 

Please post any support questions on this module here.

 

Any questions relating to any other contribution will likely be removed to keep this thread specific to the module above.

 

Hai,

When I click Continue on the CONFIRM page, it goes to https://www.sandbox.paypal.com/ login page

 

can you help me

Link to comment
Share on other sites

When I click Continue on the CONFIRM page, it goes to https://www.sandbox.paypal.com/ login page

Your module is set to "Test" - switch it to "Live" (in your shop admin -> modules -> payment). More info in the contrib user guide - please read it, it contains the answers to the most frequent queries. 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

Despite all of my research, i still cannot figure out how to get orders that were not completed (which are now marked as "Preparing [PayPal IPN] " off the orders page entirely, and just have those that were paid ("pending"). Is that even possible? I don't want my client to send off goods thinking they have been paid, when in fact, the person who was about to purchase them didn't, and just aborted the purchase.

Link to comment
Share on other sites

Hi all,

 

 

I am using Paypal contribution made by dynamo effects for a while and there is no problem in recieveing payments or any other sort.

But today I recieved one email from Paypal I am really very confused now, please help me and advise what should I do.

 

email:

 

"

Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:

 

http://www.domainname.com/PayPal/PDTHandler.aspx

 

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

 

Thank you for your prompt attention to this issue.

 

 

Sincerely,

PayPal

"

We set Aspx based test website and We put this link in paypal account. but we were always using oscommerce based store and never need to do any thing with IPN, so totally forgot about this link.

 

now please advise me what should I do , do i have to put my oscommerce based php IPN LINK in paypal IPN section or should I disable this or leave as it is.

 

if i have to put oscommerece IPN link , please advise what is a link.

 

 

thanks for any helps.

 

regards

 

zee

Link to comment
Share on other sites

I am using Paypal contribution made by dynamo effects for a while ....

Please note that this thread is ONLY for the following PayPal contribution: http://www.oscommerce.com/community/contributions,2679

As you are using a different contrib please do not post in this thread - thank you for your help in keeping this thread on topic. 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

Despite all of my research, i still cannot figure out how to get orders that were not completed (which are now marked as "Preparing [PayPal IPN] " off the orders page entirely, and just have those that were paid ("pending").

Pre-saving all orders (whether they are paid or not) is part of how the IPN works. There's no way around this - your client will have to check before sending out goods or use a different payment module. 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

Is it a requirement to have a SSL certificate on my server to run this module? Or is there another way to encrypt the information send back and forth between my shop and paypal. Does it need to be encrypted?

 

I can get everything to go through paypal, but the order is not updated in my shop and no emails are sent. I know this problem has been discussed many times before... But i just can't get anything back from paypal :(

Link to comment
Share on other sites

Despite all of my research, i still cannot figure out how to get orders that were not completed (which are now marked as "Preparing [PayPal IPN] " off the orders page entirely, and just have those that were paid ("pending"). Is that even possible? I don't want my client to send off goods thinking they have been paid, when in fact, the person who was about to purchase them didn't, and just aborted the purchase.

 

On the orders page in Admin you may remove the "so called" order that is "Preparing [PayPal IPN]" by clicking the "delete" button for that order, but do not checkmark the update inventory check box because no items have yet been removed from inventory.

 

Alan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

Terra,

 

First of all, thanks for the great module!

 

Second. I had a lot of trouble getting the module working. All orders processes were not updating (they were stuck on preparing). Using your debug script I found out that it was failing at the require('includes/application_top.php'); line.

 

In the application_top.php file I have code at the bottom to force all users to the login page. I.e. so they can't see the products unless they login. For some reason, this code in application_top.php breaks the Paypal IPN module. If I remove the code, the Paypal IPN module functions properly. Do you have any idea why, or any suggestions on how I can continue enjoying your great module while keeping the forced logins?

 

Here is the code that I am using (at the very bottom of application_top.php)

 

if (strpos($PHP_SELF, "login.php") == 0 && strpos($PHP_SELF, "create_account.php") == 0 && strpos($PHP_SELF, "privacy.php") == 0 && strpos($PHP_SELF, "conditions.php") == 0)

{

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

}

 

 

I've also tried the following code to no avail:

 

if (!tep_session_is_registered('customer_id'))

{

if (

$PHP_SELF!="/shop/login.php"

&&

$PHP_SELF!="/shop/password_forgotten.php"

&&

$PHP_SELF!="/shop/create_account.php"

&&

$PHP_SELF!="/shop/create_account_success.php"

)

{

header("Location: /shop/login.php\n");

exit;

 

}

}

 

 

Appreciate any advice.

 

Thanks again!

Edited by jfall
Link to comment
Share on other sites

Terra,

 

First of all, thanks for the great module!

 

Second. I had a lot of trouble getting the module working. All orders processes were not updating (they were stuck on preparing). Using your debug script I found out that it was failing at the require('includes/application_top.php'); line.

 

In the application_top.php file I have code at the bottom to force all users to the login page. I.e. so they can't see the products unless they login. For some reason, this code in application_top.php breaks the Paypal IPN module. If I remove the code, the Paypal IPN module functions properly. Do you have any idea why, or any suggestions on how I can continue enjoying your great module while keeping the forced logins?

 

Here is the code that I am using (at the very bottom of application_top.php)

 

if (strpos($PHP_SELF, "login.php") == 0 && strpos($PHP_SELF, "create_account.php") == 0 && strpos($PHP_SELF, "privacy.php") == 0 && strpos($PHP_SELF, "conditions.php") == 0)

{

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

}

I've also tried the following code to no avail:

 

if (!tep_session_is_registered('customer_id'))

{

if (

$PHP_SELF!="/shop/login.php"

&&

$PHP_SELF!="/shop/password_forgotten.php"

&&

$PHP_SELF!="/shop/create_account.php"

&&

$PHP_SELF!="/shop/create_account_success.php"

)

{

header("Location: /shop/login.php\n");

exit;

 

}

}

Appreciate any advice.

 

Thanks again!

 

Nevermind I got it fixed up. Just had to add strpos($PHP_SELF, "ipn.php") to the code. Thanks anyway!

Link to comment
Share on other sites

Hi guys,

 

I just recently started using this IPN module v2.2 and its pretty damn good, but i've found a few issues with it, so though i'd report them here. One rather big problem seems to be the fact that the variables posted by the module don't comply with PayPal IPN standard variables that are now used by PayPal. Even though the module still works it would be a good idea to ensure the variables compy with what PayPal expects. In particular the module posts a variable H_PhoneNumber, but PayPal is unable to pick this up and map into the phone field because it actually expects contact_phone. As per PayPal's doco https://www.paypalobjects.com/WEBSCR-475-20...rationGuide.pdf other variables relating to address and so on are also not correct.

 

I've made some fixes in my version of the code for the phone number to be passed correctly, but I hope you can review the variables in the module to align them with current paypal standards.

 

Thanks,

Nick

Link to comment
Share on other sites

I've done some more digging at it seems I was off on a wrong tangent. I was looking at the wrong doco in my previous post before. The doco I should have been looking at was https://www.paypal.com/en_US/pdf/PP_Website...rationGuide.pdf as this is post doco. I've had a look at this and cannot find a way to properly pass across the customer's telephone number and i would really like to do this so that the customer doesn't need to fill it out on PayPal. For some reason PayPal forces the customer to put in there number even when you specify in the PayPal preferences that you don't want to make it mandatory.

 

Also, i've had a look at some of the other variables being passed across by the module and it seems that there are still discrepancies between the standards outlined by PayPal in the doco above and what the module actually passes across. For example the cmd variable should have _xclick rather than _ext-enter according to the doco. There also doesn't seem to be a variable called bn accepted by PayPal, so not really sure the point of passing it across.

 

Terra, can you go through the module and make it compliant with the latest version of the Website Payments Standard doco?

 

Cheers,

Nick

Link to comment
Share on other sites

... In particular the module posts a variable H_PhoneNumber, but PayPal is unable to pick this up and map into the phone field because it actually expects contact_phone. ..

The IPN module I wrote is optimised for the UK and the variable you mention is the PayPal recommended field for UK phone numbers. I don't have plans to write a separate module for US optimisation but if any other developer has time, feel free to update the IPN with a US forke. 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

Hi there,

 

my problem was already mentioned above, but I think I found out something more so I'll give it a try and ask for help here.

 

When the customer has successfully paid and uses the button to return to the shop then, he is thrown to the login page. Period.

I looked at the source of the paypal site, and copied the action link of the button's form into my browser, and entered my shop this way. Et voilà, there's the checkout page.

 

I have to say that I'm not able to use SSL in my shop, and I have the use of cookies turned off.

 

But I simply can't understand why the return to the shop won't work, as the target adress seems to be correct, obviously...

 

Maybe someone has some new ideas how to solve this.

Thanks in advance,

 

Lodi

Link to comment
Share on other sites

Hi there,

 

my problem was already mentioned above, but I think I found out something more so I'll give it a try and ask for help here.

 

When the customer has successfully paid and uses the button to return to the shop then, he is thrown to the login page. Period.

I looked at the source of the paypal site, and copied the action link of the button's form into my browser, and entered my shop this way. Et voilà, there's the checkout page.

 

I have to say that I'm not able to use SSL in my shop, and I have the use of cookies turned off.

 

But I simply can't understand why the return to the shop won't work, as the target adress seems to be correct, obviously...

 

Maybe someone has some new ideas how to solve this.

Thanks in advance,

 

Lodi

 

Hi Lodi,

 

I have the same problem, please see my posts on the previous page. I'm not the only one as several others have posted the same problem happening. What's strange is that we all had it working prior to July. Something has changed in the way paypal posts back to osC. I don't think it's a session problem as the return to merchant works ok provided you don't pay. Also my host has confirmed no changes to the apache server and I certainly haven't messed with anything.

 

I guess it wont get sorted until a few more people report the same problem. I might be wrong but it seems to be limited to osC stores that have no SSL protection. Paypal just doesn't like returning to them anymore! Or maybe it's because you can't force cookies without SSL. Either way if you use version 2.2 of the IPN module the effect is minimal as your order emails still get sent and everything is updated correctly.

Link to comment
Share on other sites

Hi ...

 

I have the IPN module installed and everything have been working great the last 8 months. All of a sudden this past week the Paypal payment method is unavailable in the store. :blink:

 

I tried to uninstall and install and it still didn't work. There have been no updates to the server or paypal account.

 

Any ideas why this could happen? Any ideas for where to look why this happened?

Thank you VERY much in advance.

 

Anette

Link to comment
Share on other sites

Hi ...

 

I have the IPN module installed and everything have been working great the last 8 months. All of a sudden this past week the Paypal payment method is unavailable in the store. :blink:

 

I tried to uninstall and install and it still didn't work. There have been no updates to the server or paypal account.

 

Hi there!

 

I just saw this post and am in the same position (I think)... I'm not running a live store yet and still developing / testing.

 

I installed the Paypal (standard) payment module

I then installed the Paypal IPN contribution (Good contrib, looks like it's just what I need)

 

Initially, after installing just the Paypal (standard) mod everthing there worked / looked great... then I go to install the Paypal IPN mod.

The Paypal IPN mod installed and configured in the admin section perfectly... I was really happy... but conserned when it didn't show up as a payment option on the site (checkout)... I was stumped.

 

I went back into admin and did a 'remove' on the Paypal (standard) mod.

 

Now I have tested the checkout and can see / use the Paypal IPN but cannot re-activate the Paypal (standard) mod because it makes the Paypal IPN option vanish from my checkout...

 

Any ideas on how to run the 2 mods at the same time would be awesome!

 

Cheers

Tim

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