ho risolto in questa maniera...
registrazione con aggiunta campo pagato a valore 0
procedura tramite ipn.php di paypal
pagamento ok.....mi torna anche alla pagina di conferma
ora ovviamente il problema è come far passare il campo pagato da 0 a 1
nel file ipn ho fatto questa procedura
<?
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$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($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
$email = filter_var($_POST['email'], FILTER_SANITIZE_STRING);
include('../conn/con_db.php'); //
if (!$fp) {
exit();
} else {
fputs ($fp, $header . $req);
$finish = 0;
while (!feof($fp)) {
mysql_query("UPDATE users_db SET pagato = '1' WHERE email = ".$email);
$finish = 1;
}
fclose($fp);
} ?>
ma il valore rimane a zero
dove sbaglio?