mardi 25 septembre 2018

Since 9/8 PayPal IPN is not working on my website

I have a website and I am using the PayPal IPN service. It was working perfect but since 9/8/2018, the ipn.php file does not work anymore.

I have read a lot of things and I have discovered that I need to update some things since PayPal did changes.

The problem is that I am still learning about these things and I am not sure what I need to change.

I will share the code to see if someone could guide me to fix it.

    $req = 'cmd=_notify-validate';

foreach ($_POST as $key => $value)
{
  $value = urlencode(stripslashes($value));
    $req .= "&$key=$value";
}
//- Post Back To Paypal System For Validation
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ("ssl://www.paypal.com", 443, $errno, $errstr, 30);




Aucun commentaire:

Enregistrer un commentaire