How to Receive and Process Paypal IPN on a WordPress Page

I have created a WordPress Page template(listener.php) and then created a WP page using that template.The Page url is like: Here is the code i have place in the template(listener.php)

 <?php         /*Template Name: ipnlistener*/ $  ch = curl_init();     curl_setopt($  ch, CURLOPT_URL, '');     curl_setopt($  ch, CURLOPT_RETURNTRANSFER, 1);     curl_setopt($  ch, CURLOPT_SSL_VERIFYHOST, 0);     curl_setopt($  ch, CURLOPT_SSL_VERIFYPEER, 0);     curl_setopt($  ch, CURLOPT_POST, 1);     curl_setopt($  ch, CURLOPT_POSTFIELDS, "cmd=_notify-validate&" . http_build_query($  _POST));     $  response = curl_exec($  ch);     curl_close($  ch); echo "The Response From the Server is: " $  response; 

Now i go to and send and IPN using IPN Simulator pointing towards this page. After that i refresh/reload the listener page( but it always show output The Response From the Server is: INVALID While it should be VERIFIED as a completed transaction IPN is being sent to it. I am not sure what is wrong, I have pointed the IPN towards right page and the code seems to be correct as well.

When choosing payment options during checkout, should the Paypal option go directly to Paypal, or show a “continue to Paypal” link?

I currently have 2 payment options during checkout: Credit Card and Paypal. Currently, clicking on the Credit Card option will reveal a credit card form, and clicking on the Paypal option will take the user to Paypal checkout (on the Paypal site).

I have also seen it where sites such as Netflix, will show a “continue to paypal” link after selecting the Paypal payment method, instead of going straight to Paypal (shown below)

Payment Options

Paypal option selected

Is the “continue to paypal” link helpful to the user, or does it just add an extra step/confusion (because the user isn’t taken straight to Paypal after selecting the Paypal option)?

recieving payments help paypal sucks!

I have started my own business called MastoorA Beauty
I had a paypal account which worked fine for months then suddenly one customers payment was on hold and now even though they received their item and i updated tracking info, my account is still frozen and I'm out of pocket postage and item cost

I was told there is options to receive payments from paypal customers without having a paypal account. Majority of my income is with paypal customers… so Im suffering a huge blow right now.

recieving payments help paypal sucks!