Paypal IPN Validation update

  • StumbleUpon
  • Twitter
  • Digg
  • del.icio.us
  • Technorati
  • MySpace
  • Facebook
  • Google Bookmarks
  • MisterWong
  • Reddit
  • RSS

We had an issue recently where there was some difficulty contacting the paypal server to verify an IPN passed back to a PrestaShop store.

The v1 Final version of the paypal validation.php file only uses fsockopen to establish an http connection to paypal (production or sandbox) to verify, so we’ve added a little code to ours to:

1) Use a secure connection if possible (using fsockopen)
2) Use cURL if the above fails to connect, and
3) Use an insecure http connection if the above fails.

The patched files can be downloaded here: Paypal module update for Version 1.0 Final

You may also like:

  1. Improving PayPal Support in PrestaShop When I first came across PrestaShop I was utterly astonished...
  2. Possible bug in PrestaShop Paypal Module While working on a Paypal test with a customer we...
  3. BETA Version 2 Paypal Module for PrestaShop We’re pleased to release BETA 1 of our modified version...
  4. Revisiting the PayPal Beta Module Well I discovered that I had two motivations for revisiting...
  5. Yet another Google Base update 0.6.3 Get noticed in Google Product Search It’s been a busy...

Tags: , , , , , ,

8 Responses to “Paypal IPN Validation update”

  • JC says:

    hi i am cris french man, i speak a little english.

    I have download and upload on my ftp, files on ur ZIP, but i have always the same problem : Paypal receive payment , my customer receives email of paypal, i receive email for this new payment, but no order found on my BO, and this order is not validate so, my customer doesn’t see it in his account……

    i have only paypal for accept CB on my web.. :-(
    i have uninstall on BO, this module, for anyone pay with it, before we found the bug…

    Perhaps, u could help me please ?

  • admin says:

    There are several reasons for the paypal validation failing, and these fall into two main categories:

    1) Paypal cannot run the validation script on your server
    2) You server is unable to contact the paypal server to validate the IPN

    You can test (1) by browsing to the validation code that paypal calls, and verify that the permissions are set correctly i.e. browse to /modules/paypal/validation.php on your server and verify that it executes with no errors (it should result in a blank page if working correctly).

    If you get any errors accessing this page (normally a server 500 error), then you need to ensure that the permissions for this file, and the directories above it are set correctly.

    The second reason for it failing is usually down to either lack of support for both fopen, and cURL on your server, or that your hosting company has blocked access to external sites via their firewall. You will need to contact your hosting provider in these cases.

    Good luck!

  • ized says:

    gmana ih aktivasi acount paypal????

  • Michel says:

    Hi,
    sorry for my english:

    I need help.

    I have problems with paypal.
    in the process of buy the button of paypal does not work. nothing.

    directories and files: 755 and 644

    paypal_test.php: Connection to PayPal OK

    validation.php: blank page.

    fsockopen function is enabled

    I do not understand

    thanxs.
    Michel.
    Ushuaia.

  • billy says:

    hi,paul
    now i want a gspay payment interface of prestashop,would you help me?
    It need take your engery and power,so i decide to pay it.
    any comments from you will be highly appreciated.
    thanks

  • Julien says:

    Hi,

    Is Dreamhost running fopen and curl correctly for Prestahop ?

    Best regards,
    Julien

  • maleosx says:

    why dont you use curl first then secure fsockopen and if still fail use unsercure fsock ?

    • admin says:

      It mainly ended up that way since it was an evolution from the original code provided by Prestashop to be honest, rather than a conscious decision regarding which method to prefer over another. The main substance of this module was incorporated into the official PayPal module as of the production release of Prestashop version 1.1 – so unless you’re using an earlier Prestashop version there isn’t any real benefit in using this over the standard module.

Leave a Reply