Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

thank you steve. this is EXACTLY what I was looking for.

 

so I could do something like:

 

on VALIDATED/Completed: process the order fully, clear their SQL shopping cart completely, apply their voucher credit and discount code.

 

on VALIDATED/Pending: keep everything as is BUT STILL apply their voucher credit and discount code immediately.

 

on VALIDATED/Rejected: keep everything as is AND refund their voucher credit and reset their discount code status for the discount.

 

this should stop any sort of exploits from occurring with customers not coming back to the site. then customers who do come back to the site I'll just rework before_process() in the paypal module so that it tidys up all tep_session variables so they match with the current session SQL data, and generates the email and the "congratulations" screens.

 

sound good? and thanks again for the answer.

Edited by borghe
Link to comment
Share on other sites

firstly thank you for this great contribution!

 

I have managed to setup and configure the paypal_ipn module with no problems, and its working great.

 

however in my control panel whenever a order is sent through and I view it in in the orders list. it displays some weird codes and the footer is moved directly under the order box....

 

and also when I try to view the invoice, the formatting is all weird...

 

This only happens when a customer checks out with paypal. So it has to be one of the files from the module that needs attention.

 

Hi, I have found the problem. I tried to be smart and add a Paymate logo in the english language defines...

 

This caused a dodgy SQL entry for order[Payment_method] , Removed the img code and reset the SQL entry for this order. AOK now.

 

Cheers :)

Link to comment
Share on other sites

I'm having a problem with the checkout process everything works perfect until I get switched over to paypal to complete payment. The shipping price is not getting carried over. Any ideas it just allows for the product to be paid for and shows shipping as zero but only on paypals site in oscommerce it works fine.

Link to comment
Share on other sites

I'm having a problem with the checkout process everything works perfect until I get switched over to paypal to complete payment. The shipping price is not getting carried over. Any ideas it just allows for the product to be paid for and shows shipping as zero but only on paypals site in oscommerce it works fine.

 

In the Admin module is the Payment Zone set up for a particular currency? This was doing something similar for me, when I set it back to none transactions went through to this point OK.

 

Regards

Link to comment
Share on other sites

I've just installed this contrib, everything looks great but when i checkout and get directed to paypal, the price is $0.00.

 

Anyone got any ideas??

 

Thanks in advance!

 

PS. should i use the encryped section of this contrib or is it perfectly safe without?

Link to comment
Share on other sites

Hi can anyone point me in the right direction please?

 

I have a fairly new site and have this contribution installed. All works fine in that it creates a preparing IPN order at confirmation stage and then the customer pays with paypal I get an email from paypal confirming payment.

 

However, it is just not changing the status of the order and I have been having to check my paypal payments against the orders and update them manually! Was okay as a temporary solution but becoming a bit of a problem lol.

 

The customers are coming back to my site generally and receiving the checkout success message so can someone please give me a clue as to what I am missing? Is it something on my site settings or at the paypal end perhaps? I am UK if that offers any clues.

 

any help appreciated :'(

Link to comment
Share on other sites

Hi can anyone point me in the right direction please?

 

I have a fairly new site and have this contribution installed. All works fine in that it creates a preparing IPN order at confirmation stage and then the customer pays with paypal I get an email from paypal confirming payment.

 

However, it is just not changing the status of the order and I have been having to check my paypal payments against the orders and update them manually! Was okay as a temporary solution but becoming a bit of a problem lol.

 

The customers are coming back to my site generally and receiving the checkout success message so can someone please give me a clue as to what I am missing? Is it something on my site settings or at the paypal end perhaps? I am UK if that offers any clues.

 

any help appreciated :'(

Not sure this is the problem, but in your Paypal IPN settings in the admin > Modules > Payment section - check the setting for "Set Paypal Acknowledged Order Status" - if you set it to default it should work out.

Link to comment
Share on other sites

Ummm, I just got a wierd e-mail from my site stating this:

 

Subject: Paypal IPN Invalid Process

 

Body:

$_POST:

 

 

$_GET:

 

Why would I get this mail, what does it mean, should I be worried ? What would cause this? Did someone try to process an order and then got an error and it sent me this? (I have no orders pending, I'm a fairly new store, so I'm hoping no customers were deterred by this) Any ideas to what happened and how to fix it?

We must be the change we wish to see in the world.

------------------------------------------------------------

p.s. BACKUP!

Link to comment
Share on other sites

Hi everyone,

I have just done a fresh install of osCommerce 2.2 Milestone 2 Update 051113.

I have gone through the various Admin options and set them up for my business. At this point, the only products etc in the database are the ones supplied in the default installation.

This is a picture of the folder structure I have after doing the install:

 

Myfolderstructureforosc2.jpg

 

Since I intend to use PayPal as my payment processor, I have also downloaded Terra's v1.3 PayPal payments module and tried to install it. This is where I'm having a problem.

In the readme file supplied it says:

 

Copy the files in the directory structure set in the contribution download file to your osCommerce installation directory. Note: Be sure to also copy the new "ext" directory to the catalog root directory.

 

To me that means install into the osc folder, meaning that the 'catalog' and 'help files' folders will be under osc. So I did that, and I am not getting anything in the Admin options. ( I have the 'ext' folder as a sub folder of 'catalog'.)

Also, as you can see from the picture (created before I uploaded Terra's v1.3) above, I don't have an existing 'catalog' folder. So the v1.3 upload created it for me.

 

1) Given my folder structure, can someone please tell me which folder the 'catalog' and 'help files' should be located?

2) Note that I have 3 languages at the moment and plan to add more. I am assuming that some of Terra's files will need to have translations done so they show correctly in those other languages.) (I will send any translations I do to Terra, unless he asks me to send them elsewhere or host them.)

 

 

Cheers,

Nap

Link to comment
Share on other sites

After reading still more of the questions/answers given in the other posts, I assumed that people are using 'catalog' as the root folder for thier osCommerce install (where I used 'osc'.

So I:

1) put the 'ext' folder as a sub-folder of my 'osc'

2) copied the includes folder supplied by Terra's d/l over the existing includes folder (thus some files have been updated).

3) put the 'help files' folder also as a sub folder of 'osc'.

 

Still no joy.

 

Cheers,

Nap.

 

ps.. after reading how easy it was for others to install, I think I'm missing something. But please don't bother to mention what you think it might be.

Link to comment
Share on other sites

Attempt number 3.

My prevous attempts were done using the cPanelX interface from my webhost.

I used the downloaded install (oscommerce-2.2ms2-051113) from www.osCommerce.com, and this time I have a list of payment methods available on the payments page in the admin consol.

I will now try to load Terra's v1.13 module.

 

Cheers,

Nap

Link to comment
Share on other sites

Hi everyone,

 

I have a question on istalling this contrib. Im pretty sure the contrib is installed correctly just concerned about modifing it before setting it to live.

 

When you install it in the admin pannel toward the end when you modify the settings. What is all of the.pem and other stuff? Is it nescesary for this info? Also will this work with just my paypal account info like the standard paypal?

 

None of these questions was answered in the install or readme.

 

Thanks,

Eric

Link to comment
Share on other sites

Hi everyone,

 

I have a question on istalling this contrib. Im pretty sure the contrib is installed correctly just concerned about modifing it before setting it to live.

 

When you install it in the admin pannel toward the end when you modify the settings. What is all of the.pem and other stuff? Is it nescesary for this info? Also will this work with just my paypal account info like the standard paypal?

 

If you set "Enable Encrypted Web Payments" to False, you don't need to do anything with the settings that follow it.

 

If you set "Enable Encrypted Web Payments" to True, which is highly recommended, you must fill in all those fields. I have done this on my site, but have forgotten the details.

 

None of these questions was answered in the install or readme.

Perhaps not with the detail that you require, but all of this is covered in Terra's installation guide for this module.

 

--Glen

Link to comment
Share on other sites

:( Hi

 

just back from trying to setup the sandbox for testing my paypal system. What fun trying to validate the accounts I setup a personal and a premier one. The fact that you cannot get the information auto infilled unless U.S. based makes it a pain.

 

The sandbox appears to get stuck at validating a phone number as it is not appearing to recognise what you enter. I have read the contribution install sheet and the pdf manual from "Paypal" and tried to find the information upon their help forum to no avail, there must be an easier way. I will let you know if I find it.

 

Dave

Edited by Jaguars
Link to comment
Share on other sites

:( Hi

 

just back from trying to setup the sandbox for testing my paypal system. What fun trying to validate the accounts I setup a personal and a premier one. The fact that you cannot get the information auto infilled unless U.S. based makes it a pain.

 

The sandbox appears to get stuck at validating a phone number as it is not appearing to recognise what you enter. I have read the contribution install sheet and the pdf manual from "Paypal" and tried to find the information upon their help forum to no avail, there must be an easier way. I will let you know if I find it.

 

Dave

 

 

If it is any help, I could not get sandbox to work after all the hassle of setting up either. Gave up and put low value dummy item on my site and quickly tested live with a credit card. Worked fine and just refunded myself! Still not able to persuade ipn to update my order status though....... another story :'(

Link to comment
Share on other sites

If it is any help, I could not get sandbox to work after all the hassle of setting up either. Gave up and put low value dummy item on my site and quickly tested live with a credit card. Worked fine and just refunded myself! Still not able to persuade ipn to update my order status though....... another story :'(

:D Hi

 

just to keep you updated I have posted a request upon the paypal forum, yesterday.

I have not had any replies as yet, I will let you know if I have any positive help.

 

:'(

 

Dave

Link to comment
Share on other sites

Still not able to persuade ipn to update my order status though....... another story :'(

Check with your hosting provider if you have a firewall in place - a GoDaddy hosted website owner has posted the code on this thread how to make it work with their firewall but solutions obviously may vary depending on your hosting set-up. 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 will send any translations I do to Terra, unless he asks me to send them elsewhere or host them.)

I'm a female of the species - but translations are welcome. German I can handle myself, but everything else is good. Actually, given how little text there is to translate, I just never bothered before - if you need more languages, just copy the language level as needed. Any translations can also be posted on this thread & I'll pick them up in the next update. 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'm having problems getting this package to work. I've combed over 30 pages for this thread and nothing seems to work. I even went as far as doing a complete reinstall of oscommerce and reinstalled this package from scratch. The following are my symptoms

 

When I complete an order on the sandbox, the status of the order goes to Preparing paypal IPN and stays there even though I've completed the transaction.

 

I took Terra's advice in a previous post and inserted debug emails in ipn.php and I only receive the first email which states that I' ve received the mail that states that paypal has successfully accessed ipn.php on my server. However that is all the debug messages I receive which indicates to me that paypal has never correctly verified each parameter.

 

I'm using the latest paypal IPN1.3 module and I believe I've tried everything. It seems as though this module is working for everyone else which leads me to believe that I'm doing something incorrect. Is there anything obvious that I can try?

 

I've inserted various other debug mails into ipn.php as well. However, following the require("application_top.php") line, I don't receive any debug emails whatsoever.

 

I've turned off password protection, fresh install of oscommerce and the payment module. The IPN notification is turned off in my sandbox account. Anything else I can try?

 

Thanks

Link to comment
Share on other sites

Terra: Sorry for my presumptious nature concerning programmers, and thanks for your reply.

 

I am now searching for help on how to configure the fields required when 'Enable Encrypted Web Payments' is turned on.

1) My main question is where do I get each piece of info. URL names would be nice, or Tab/Section names would also be good.

2) My other question is where to put these keys/certificates in my webspace (since I am on a shared SSL) and what CHMOD settings should I have on the folder contaning them.

 

I downloaded this thread so I could search it easier, but the file only contains entries made up to Mar 9 2005.

 

I am a little confused by the different terminologies used by the various parties, so what should be easy is not.

 

Cheers,

Nap

Link to comment
Share on other sites

I am now searching for help on how to configure the fields required when 'Enable Encrypted Web Payments' is turned on.

1) My main question is where do I get each piece of info. URL names would be nice, or Tab/Section names would also be good.

2) My other question is where to put these keys/certificates in my webspace (since I am on a shared SSL) and what CHMOD settings should I have on the folder contaning them.

The encrypted payments thingy is a PayPal service - here's some info on it:

Login to your PayPal account, click on Profile > Encrypted Payment Settings. Click on “Download” to download PayPal’s public certificate. Create your own certificate and upload it to PayPal

To create your own certificate, you can use openssl:

Create a private key: openssl genrsa -out my-prvkey.pem 1024

Create the public certificate: openssl req -new -key my-prvkey.pem -x509 -days 365 -out my-pubcert.pem

When you upload your certificate, PayPal returns to you a “PayPal Public Certificate ID”. This is one of the parameters that osC requires

More info on this can be found at https://www.paypal.com/en_US/pdf/PP_Website...rationGuide.pdf

You can optionally block all non-encrypted payments: go to Profile > Website Payment Preferences, and choose “on” in “Block Non-encrypted Website Payment”

Never used this myself, so this is all I got on it - I'd recommend the above developer guide or maybe the PayPal Developer Forum if you have more queries.

 

Personally, I've got cURL enabled on my server, so that's good enough - don't forget that you don't transmit any sensitive payment information. All that gets sent is customer details (name, email) - obviously, encrypting is still a good thing and I'd recommend it, but if you have cURL enabled, it's good enough. 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 took Terra's advice in a previous post and inserted debug emails in ipn.php and I only receive the first email which states that I' ve received the mail that states that paypal has successfully accessed ipn.php on my server. However that is all the debug messages I receive which indicates to me that paypal has never correctly verified each parameter.

Does your host use a firewall? 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 contacted my hosting company (BlueHost) and they told me that fsockopen should work fine as long as it is to port 80 or 443 for ssl. I did a little more debugging by sending email to myself and it appears that the code that generates the http requests isn't even being executed at all.

 

In the code below, I received the "Step1" email notification but the second mail statement below does not even get executed. It seems as though the rest of the ipn.php code doesn't get executed at all following the require('includes/application_top.php); Can you suggest a reason why this would occur?

 

$debugemail = '[email protected]';

---->mail($debugemail, 'Debug Test', 'Step1 complete');

 

chdir('../../../../');

require('includes/application_top.php');

 

---->mail($debugemail, 'Debug Test', 'Step 2 complete');

$parameters = 'cmd=_notify-validate';

 

foreach ($_POST as $key => $value) {

$parameters .= '&' . $key . '=' . urlencode(stripslashes($value));

}

 

if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') {

$server = 'www.paypal.com';

} else {

$server = 'www.sandbox.paypal.com';

}

 

$fsocket = false;

$curl = false;

$result = false;

 

if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {

$fsocket = true;

} elseif (function_exists('curl_exec')) {

$curl = true;

} elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {

$fsocket = true;

}

Link to comment
Share on other sites

Hi, interesting thread.. Am I right in thinking that there is a new paypal ipn thats been released in the last month or so?

 

Im still getting a lot of false orders that are coming through. From what I believe its because people are going all the way through and then either clicking to come back to the site or bailing out at the paypal screen.

 

surely if they are registering on my site then the paypal thing should be obvious?

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

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