I have set up my ipn listener but. i am not getting any response regarding "valid/invalid" although the paypal handshake has been confirmed -


i have created log file logs response paypal debug3_fgets.txt . issue facing there no response returning me paypal. there issue code? running through sandbox.

    $debug = true;      $resp = 'cmd=_notify-validate';       foreach ($_post $key => $value) {     $value = urlencode(stripslashes($value));     $resp .= "&$key=$value";     }       $header = "post /cgi-bin/webscr http/1.0\r\n";     $header .= "content-type: application/x-www-form-urlencoded\r\n";     $header .= "content-length: " . strlen($resp) . "\r\n\r\n";      $fp = fsockopen ('https://ipnpb.sandbox.paypal.com/cgi-bin/webscr', 443, $errno, $errstr, 30);      if (!$fp)   {     }  `else` // if we've connected ok {  `fputs ($fp, $header . $resp);`//post data      while (!feof($fp))      {$response = fgets ($fp, 1024);         if ($debug)     {      $ourfilename = "debug/debug3_fgets.txt";     $ourfilehandle = fopen($ourfilename, 'w') or die("can't open file");     fwrite($ourfilehandle, $response);     fclose($ourfilehandle);  }      if (strcmp ($response, "verified") == 0)      {      if($first_name!=null){   }}      else if (strcmp ($response, "invalid") == 0)   {  }} //end of while      fclose ($fp);  }`header("http/1.1 200 ok");` 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -