je rencontre actuellement un problème avec PAYPAL et l'IPN.
En résumé :
- Mes comptes sandbox sont ok.
- l'IPN est bien envoyé sur mon site
- l'authentification IPN est ok : HTTP/1.1 200 OK
Le problème viens lors de la récupération du "VERIFIED".
Code : Tout sélectionner
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Host: www.sandbox.paypal.com\r\n";
$header .= "Connection: close\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
if (!$fp) {
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp($res,"VERIFIED")==0)
{
mon code...
}Je récupère bien VERIFIED, par contre quand je récupéere la valeur de la fonction strcmp, il me sort 2...et non 0.
Avez vous une solution pour moi ?
Merci d'avance