Testing Paypal IPN locally

based on Paypal tutorial, this is the form they provide for testing the IPN:

<form target="_new" method="post" action="https://www.YourDomain.com/Path/YourIPNHandler.php">
  <input type="hidden" name="SomePayPalVar" value="SomeValue1"/>
  <input type="hidden" name="SomeOtherPPVar" value="SomeValue2"/>

  <!-- code for other variables to be tested ... -->

  <input type="submit"/>

I got my IPN listener code in server/routing.js and used iron router and specified the path to /ipn. here is the code for it

Router.map(function () {
    this.route('ipn', {
        path: '/ipn',
        where: 'server',

so my question now, what URL should i put in the form instead of "https://www.YourDomain.com/Path/YourIPNHandler.php" URL? Because am testing it in my local machine "localhost:3000"


I had the same problem friend. The solution was very simple. Paypal does not allow test in your local machine: Paypal says: We're sorry, URL with port number is not allowed for IPN. You must have a server with your "www.YourDomain.com". In my case for development tests I downloaded a "tunnel" application called NGROK which gives to you a testing domain. You can get it from here. Then will be enought just open the ngrok console and write the command:

> ngrok http -host-header=localhost 3000

After that execute your web application. After you've started ngrok, just open http://localhost:4040 in a web browser to review your domain provided by ngrok. When you go to localhost:4040 in your browser ngrok show to you a http and http domains like they show in the examples.


Now just replace "www.YourDomain.com" with this ngrok URL.

Hope this helps to you. Regards!

Need Your Help

Semantic ui accordion inside table

jquery meteor meteor-blaze semantic-ui

I want each table row to be clickable such that it expands like an accordion, but when the accordion activates, it doesn't take up the length of the entire row. How can I make it take up the entire...

Erratic UIPageControls

iphone uipagecontrol

I'm using two UIPageControls in a view to reflect chapters and pages. So I have defined one UIPageControl named chapterCount and one named pageCount just to show where the user is. I handle the fli...