Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

That hits the nail on the head: Ship to the address on the Transaction Details page. Because the address isnt being passed through from OSC to Paypal then it cant tell if the address is verified or not.

 

i just checked with a friend who is definatly verified and got him to place a test order. Hes verfied and on another site that I run with Xcart, he placed the same order and it said that I was eligable for seller protection.

 

Where you said

"I had to tweek the IPN module to pass the peramiter that insists the buyer give a shipping address as well as a billing address on Paypal (they only enter it once if it's the same)."

 

How did you tweak it to pass the address into Paypal?

 

TIA

Things still to do before going "live" in no real order...

Change "buy now buttons" css styles

Change "lets see what we have here" into something meaningfull

Main logo of the website

Sort out currency to make site UK only (at present)

Remove "xx requests since" stuff

Update mainpage :D

Move shopping cart status into header

Add in stock status to product listing page

Define styles for product listing standardisation

Change CSS background for Headings

Increase Category size headings

Used mods so far:- basic_design_pack1mk7 | Google XML sitemap w admin | Paypal IPN v 1.2 | Feedmachine | pricematch_1_3_1 | Dynamic Sitemap 1.6 | Whos online Enhancement | Easypopulate 2.72

 

Each one that I solve I;ll be putting a post on the forum in a "completed shop" thread that Im writing up

Link to comment
Share on other sites

That hits the nail on the head: Ship to the address on the Transaction Details page. Because the address isnt being passed through from OSC to Paypal then it cant tell if the address is verified or not.

 

i just checked with a friend who is definatly verified and got him to place a test order. Hes verfied and on another site that I run with Xcart, he placed the same order and it said that I was eligable for seller protection.

 

Where you said

"I had to tweek the IPN module to pass the peramiter that insists the buyer give a shipping address as well as a billing address on Paypal (they only enter it once if it's the same)."

 

How did you tweak it to pass the address into Paypal?

 

TIA

 

The address they check for the eligibility is the one the customer enters as "His Billing address" on the credit card form.

 

It has nothing to do with what OSC passes to PayPal. In fact last time I heard this module cant automatically pass the address to PayPal.

 

I discovered if you want to use PayPal's shipping label system, and be sure to ship to a verified address, because your not getting a "shipping address" from the buyer at PayPal, change the line at or about 328 in catalog/includes/modules/payment/paypal_ipn.php from

 

$parameters['no_shipping'] = '1';

 

To

 

$parameters['no_shipping'] = '2';

 

This will force the buyer re-enter their shipping address at the PayPal website. With the parameter set at 1 it is optional and NO ONE fills out optional information anymore. I've had maybe 2 customers complain it's a pain for the them to have to enter an address again, but it is just another way to confirm they are who they claim to be and provides the needed shipping address information that unfortunately the osCommerce PayPal IPN Module does not send to PayPal. One thread here said it was because of a security issue. I don't know if that's fact or fiction. But this fixed my issues with both the "confirmed address" and shipping label system not getting an address I could use.

 

Also in your PayPal profile you need to set the don't accept payments without a confirmed address option or you can still get some payments that are ineligible.

Link to comment
Share on other sites

LOL!!

 

Thankfully, I am a religious person. I've already started investigating with powweb regarding any firewalls. Thanks again,

 

Onnig

 

Here's powweb's response, you're gonna love it Terra!

 

There is no good solution. The ticket I submitted on this was closed as "we'll work on it, and in the meantime, ask us to move your site back to the old platform". It would appear that PHP's cURL support was incorrectly configured on the new platform. Luckily, I had not actually migrated my store yet as there were several things still broken on the new platform in my testing - this being one of them. (Unreliable e-mail sending is another.)

 

The immediate workaround for you is to move your site back to the legacy platform until this is fixed. I have seen some posts showing how executing cURL from a command line works, but I don't see that as a workable solution in this case.

 

I was not given a timeframe on a solution - I just hope it's before they turn off the legacy servers.

 

So I guess I'll deal with the INVALID paypal-ipn emails until them. Lovely.

Onnig

Link to comment
Share on other sites

Ok, I see Paypal and I see Paypal IPN. I assume I just install....so where I go....fingers crossed...

 

I have not been able to get this far. Paypal IPN is not showing up in my site Admin. I uploaded the paypal_ipn.php files into the folders that already existed on the server from my previous install of osCommerce, along with the entire ext folder and its contents (including all folders and the ipn.php file). I did this all with dreamweaver, dragging the files to the appropriate place on the server. As I said, PayPal IPN is not showing up in the admin, so I can't even get past step 2 of the install intructions. Did I do the install incorrectly? The files show up in the file manager, but not in the module section.

 

Would it have anything to do with the fact that I'm working from a Mac?

 

any help would be appreciated!

c.

Link to comment
Share on other sites

It has nothing to do with what OSC passes to PayPal. In fact last time I heard this module cant automatically pass the address to PayPal.

It can be done but give a girl a bit of time - it's over 30C in my office and our busiest period, so updates to the contrib are in the queue at the moment. But have a look around page 57 / 58 of this thread - some info there about how to pass address stuff to PayPal. 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

I have not been able to get this far. Paypal IPN is not showing up in my site Admin. I uploaded the paypal_ipn.php files into the folders that already existed on the server from my previous install of osCommerce, along with the entire ext folder and its contents (including all folders and the ipn.php file). I did this all with dreamweaver, dragging the files to the appropriate place on the server. As I said, PayPal IPN is not showing up in the admin, so I can't even get past step 2 of the install intructions. Did I do the install incorrectly? The files show up in the file manager, but not in the module section.

 

Would it have anything to do with the fact that I'm working from a Mac?

 

any help would be appreciated!

c.

 

There are two files called "paypal_ipn.php". One is the actual payment module; it goes into /catalog/includes/modules/payment/. The other one contains the English language strings. It goes into /catalog/includes/languages/english/modules/payment/. Make sure that both files are uploaded and the right one is in the right place.

 

It has nothing to do with you being on a Mac, though it might have something to do with Dreamweaver. I use Interarchy as my FTP client, though there is one built into the Mac OS X Finder. (Go -> Connect to Server)

 

--Glen

Link to comment
Share on other sites

Thanks Glen...

I have uploaded the files already and I'm pretty sure each of the files is in the right place. They're just not showing up in the Admin so I can't install the ipn module. any ideas?

Link to comment
Share on other sites

Thanks Glen...

I have uploaded the files already and I'm pretty sure each of the files is in the right place. They're just not showing up in the Admin so I can't install the ipn module. any ideas?

 

If they are in the right place, modules.php will open them. It automatically opens any php files it finds in the /catalog/includes/modules/payment/ directory. Note that the module will call itself "PayPal" in the listing, just like the standard module. Click on it, and the column on the right will display "PayPal IPN" below the install button. The standard module says "PayPal" below the button.

 

--Glen

Link to comment
Share on other sites

It can be done but give a girl a bit of time - it's over 30C in my office and our busiest period, so updates to the contrib are in the queue at the moment. But have a look around page 57 / 58 of this thread - some info there about how to pass address stuff to PayPal. Terra

 

Oh now come on Terra women are supposed to be able to multitask.... men only have one track minds. :-"

 

Now back to the problems at hand.

 

I am going to move a copy of my shop to a new server and break everything most likely. Any good plans on how to do this?

 

Also Terra can you email me the debug file you created for the IPN module?

Link to comment
Share on other sites

I just tried disabling the original PayPal. no luck...

would it have anything to do with the CHMOD settings on the folders and files I uploaded? (can you tell I'm grasping at straws here?)

 

Backup and start from the beggining of Terras install guide in the latest version of this contrib download. You have missed a step or not uploaded a nessesary something.

Link to comment
Share on other sites

In the Admin section of OSC yes.

 

okay, how exactly do I do this?

In the Admin tool, in the Modules->Paymet I can select "PayPal" and my options in the menu on the right is "remove" and "edit". "Edit" just lets me change the parameters of the original PayPal module. I tried removing it... But then what? I still don't see "PayPal IPN" anywhere in the modules section of Admin, so can't install it. Am I supposed to remove the original PayPal and install PayPal IPN in a differnt section of Admin?

 

Please give me dummied-down step-by-step instructions.

 

thanks for your responses!

c.

Link to comment
Share on other sites

Backup and start from the beggining of Terras install guide in the latest version of this contrib download. You have missed a step or not uploaded a nessesary something.

 

okay, I'll give it a go. stay tuned for the next gripping episode!

thanks!

c.

Link to comment
Share on other sites

Holy Moly it worked.

 

Thank you!

 

Okay, so it's up and running with the PayPal IPN module installed. Let me run thru everything I learned for the benefit of those watching at home and those furiously searching this forum for the same answers.

 

Uploading the files via Dreamweaver didn't seem to work. So I started over with Terra's latest version (1.3) and uploaded the two "paypal_ipn.php" files directly thru OSC Admin>File Manager. I recreated the folder structure for the "ext" batch one folder at a time and then uploaded the "ipn.php" file too. I know it's inconceivable, but I don't have an FTP program. I've been fine up til now using Dreamweaver! Anyway, Voila! I go to Admin>Modules and "PayPal (Credit Card/Debit)" is now there (highlighting it shows "IPN" in the righthand menu). I set it up according to Terra's install guide and it's good to go. After running a few test transactions everything seems to be working, granted the known issues outlined in Terra's install instructions. Bottom Line: If a customer does NOT click "Return to Merchant" or "Complete Order Confirmation" after their PayPal transaction I nonetheless have a copy of their order details in Admin>Customers>Orders, with the order status marked "Preparing [PayPal IPN]". To determine if these orders are valid, I must manually compare my list of OSC orders marked "Preparing [PayPal IPN]" with the list of completed transactions in my PayPal account. And I have to manually update the stock. A bit of a pain. Actually an enormous pain if you're planning on processing a lot of orders... But it works?And hey, I'm not complaining. Free, useable open-source code with extensive support forums? better than a stick in the eye. The only danger is that it makes any idiot with an internet connection (me) think he can code an ecommerce site?The other drawback not mentioned in Terra's known issue list is that any comments the customer wrote during Checkout are lost (if the customer doesn't return to my site from PayPal).

 

Does all that make sense?

 

All the above are issues only if the customer DOES NOT return to my site after PayPal transaction. To help alleviate this I put in a line of text on the checkout_confirmation page that says something like "Once you have completed your PayPal transaction, be sure to click Return To Merchant" with a link to a page displaying further explanation. Sort of ghetto, but I'm small time so I think I can get away with it. It's better than one of those Under Construction animated gifs.

 

Here's one other issue I noticed. Maybe it's been addressed somewhere else?

From the /checkout_confirmation.php page a customer can manually redirect the URL to /checkout_process.php and fool OSC into thinking they bought whatever products were in their cart, without paying for them. When this is done OSC sends an order receipt to this "customer" and deducts the product stock, and the order appears in the Admin (marked "Preparing [PayPal IPN]"). It doesn't fool PayPal of course, but this loophole could create quite a mess for store owners to sort out. Any solutions on that one?

 

Again, thanks! really appreciate the help. sorry for the long post but I hope it'll help some other poor lost soul.

c.

Link to comment
Share on other sites

Holy Moly it worked.

 

Thank you!

 

Okay, so it's up and running with the PayPal IPN module installed. Let me run thru everything I learned for the benefit of those watching at home and those furiously searching this forum for the same answers.

 

Uploading the files via Dreamweaver didn't seem to work. So I started over with Terra's latest version (1.3) and uploaded the two "paypal_ipn.php" files directly thru OSC Admin>File Manager. I recreated the folder structure for the "ext" batch one folder at a time and then uploaded the "ipn.php" file too. I know it's inconceivable, but I don't have an FTP program. I've been fine up til now using Dreamweaver! Anyway, Voila! I go to Admin>Modules and "PayPal (Credit Card/Debit)" is now there (highlighting it shows "IPN" in the righthand menu). I set it up according to Terra's install guide and it's good to go. After running a few test transactions everything seems to be working, granted the known issues outlined in Terra's install instructions. Bottom Line: If a customer does NOT click "Return to Merchant" or "Complete Order Confirmation" after their PayPal transaction I nonetheless have a copy of their order details in Admin>Customers>Orders, with the order status marked "Preparing [PayPal IPN]". To determine if these orders are valid, I must manually compare my list of OSC orders marked "Preparing [PayPal IPN]" with the list of completed transactions in my PayPal account. And I have to manually update the stock. A bit of a pain. Actually an enormous pain if you're planning on processing a lot of orders... But it works?And hey, I'm not complaining. Free, useable open-source code with extensive support forums? better than a stick in the eye. The only danger is that it makes any idiot with an internet connection (me) think he can code an ecommerce site?The other drawback not mentioned in Terra's known issue list is that any comments the customer wrote during Checkout are lost (if the customer doesn't return to my site from PayPal).

The whole point of this module is that PayPal will notify osC automatically when the customer hits 'Pay' at the PayPal site, irrespective of whether the customer returns. It appears that ipn.php might not be in the right place. To see where PayPal is attempting to go, you might be able to open up a second browser window with Who's Online (found in the Admin under Tools). Or you can check your logs for the 404 error when PayPal tries to load ipn.php. You shouldn't have to manually change any "Preparing [PayPal IPN]" to "Pending" if this module is working correctly.

 

Here's one other issue I noticed. Maybe it's been addressed somewhere else?

From the /checkout_confirmation.php page a customer can manually redirect the URL to /checkout_process.php and fool OSC into thinking they bought whatever products were in their cart, without paying for them. When this is done OSC sends an order receipt to this "customer" and deducts the product stock, and the order appears in the Admin (marked "Preparing [PayPal IPN]"). It doesn't fool PayPal of course, but this loophole could create quite a mess for store owners to sort out. Any solutions on that one?

 

Again, thanks! really appreciate the help. sorry for the long post but I hope it'll help some other poor lost soul.

c.

The key is that the order will stay at "Preparing [PayPal IPN]". Any orders with this status that are 24-48 hours old can be deleted, as the customer never pressed a "Pay" button on the PayPal web site. As I mentioned above, when it's working correctly, the order will change to "Pending" when PayPal accesses ipn.php.

Link to comment
Share on other sites

The whole point of this module is that PayPal will notify osC automatically when the customer hits 'Pay' at the PayPal site, irrespective of whether the customer returns. It appears that ipn.php might not be in the right place. To see where PayPal is attempting to go, you might be able to open up a second browser window with Who's Online (found in the Admin under Tools). Or you can check your logs for the 404 error when PayPal tries to load ipn.php. You shouldn't have to manually change any "Preparing [PayPal IPN]" to "Pending" if this module is working correctly.

 

 

The key is that the order will stay at "Preparing [PayPal IPN]". Any orders with this status that are 24-48 hours old can be deleted, as the customer never pressed a "Pay" button on the PayPal web site. As I mentioned above, when it's working correctly, the order will change to "Pending" when PayPal accesses ipn.php.

This is my first post here. Here is my problem.

OK I finally got paypal to show the total with tax but it does'nt show shipping. what do i need to do next?

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

This is my first post here. Here is my problem.

OK I finally got paypal to show the total with tax but it does'nt show shipping. what do i need to do next?

Finally fixed this. Had to override profile shipping options at paypal. Couple of hours of reading but learned a few more things too!!!

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Hi Terra,

 

Thansk for your post, as with allthe posters here: Just wondering did you manage to get the contrib que updated? Is there a newer version of the IPN in there?

 

Also jsut read about what people said above. Do I need to remove the Paypal option. At the moment its set to false or is it better to completly remove it?

Things still to do before going "live" in no real order...

Change "buy now buttons" css styles

Change "lets see what we have here" into something meaningfull

Main logo of the website

Sort out currency to make site UK only (at present)

Remove "xx requests since" stuff

Update mainpage :D

Move shopping cart status into header

Add in stock status to product listing page

Define styles for product listing standardisation

Change CSS background for Headings

Increase Category size headings

Used mods so far:- basic_design_pack1mk7 | Google XML sitemap w admin | Paypal IPN v 1.2 | Feedmachine | pricematch_1_3_1 | Dynamic Sitemap 1.6 | Whos online Enhancement | Easypopulate 2.72

 

Each one that I solve I;ll be putting a post on the forum in a "completed shop" thread that Im writing up

Link to comment
Share on other sites

Also jsut read about what people said above. Do I need to remove the Paypal option. At the moment its set to false or is it better to completly remove it?

 

I left mine, along with all the other default payment modules. I would leave them uninstalled (click remove if you installed it), but leave the files in place, as it doesn't seem to interfere. I have both this PayPal IPN module and the PayPal WPP module installed. They don't conflict.

 

--Glen

Link to comment
Share on other sites

I am not too much of a programer but as far as the issue as to sending the state to paypal is concerned would something like this work?

if ( $order->billing['state'] == "Florida" ) {
$parameters['state'] = "FL"
}

 

I havent taken a programming class since high school so correct it if I typed it in wrong. I realize writing that out for every state would be a pain but since I only sell to people in the states I think it would work.

Link to comment
Share on other sites

I am not too much of a programer but as far as the issue as to sending the state to paypal is concerned would something like this work?

if ( $order->billing['state'] == "Florida" ) {
$parameters['state'] = "FL"
}

 

I havent taken a programming class since high school so correct it if I typed it in wrong. I realize writing that out for every state would be a pain but since I only sell to people in the states I think it would work.

 

The two letter state code is stored in the osC database in the zones table, so you could do a lookup like the one I posted a while back in this thread.

 

Try this:

$state_query = tep_db_query("SELECT " . TABLE_ZONES . ".zone_code FROM ". TABLE_COUNTRIES . "," . TABLE_ZONES . " WHERE  ". TABLE_COUNTRIES . ".countries_id = " . TABLE_ZONES . ".zone_country_id AND " . TABLE_ZONES . ".zone_name = '" . $order->billing['state'] . "' AND ". TABLE_COUNTRIES . ".countries_name = '" . $order->billing['country'] . "'");
$state = tep_db_fetch_array($state_query);
$parameters['state'] = $state['zone_code'];

Edited by SteveDallas
Link to comment
Share on other sites

I moved the site to a new host, but now I am getting this error on the page.

 

Warning: main(includes/modules/payment/paypal/classes/osC/osC.class.php): failed to open stream: No such file or directory in /home/*******/public_html/includes/application_top.php on line 134

 

Now I never added this contribution, the old web guy did that used to work here. I'm trying to figure out if this is this contribution here that is acting up, and of course how to resolve this issue.

 

Thanks ahead of time.

Link to comment
Share on other sites

The two letter state code is stored in the osC database in the zones table, so you could do a lookup like the one I posted a while back in this thread.

 

Try this:

$state_query = tep_db_query("SELECT " . TABLE_ZONES . ".zone_code FROM ". TABLE_COUNTRIES . "," . TABLE_ZONES . " WHERE  ". TABLE_COUNTRIES . ".countries_id = " . TABLE_ZONES . ".zone_country_id AND " . TABLE_ZONES . ".zone_name = '" . $order->billing['state'] . "' AND ". TABLE_COUNTRIES . ".countries_name = '" . $order->billing['country'] . "'");
$state = tep_db_fetch_array($state_query);
$parameters['state'] = $state['zone_code'];

 

I plugges that in but it didnt seem to work for my. I ended up doing a massive list of if statements and it seems to work just fine. Not the graceful way of doing but it works.

 

Only problem I have now is that the phone number is being sent like this 5551234567 -- I am gonna try to teach my self a little php but is there anyway to convert this to a from I can give to paypal?

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