bonjour , j'ai cette erreur , quelqu'un peux m'aider ?
"Fatal error: Call to undefined function mail_erreur_invalid() in /home/ah48199/web/www/ipn.php on line 56'"
"Fatal error: Call to undefined function mail_erreur_invalid() in /home/ah48199/web/www/ipn.php on line 56'"
Code:
<?php include('db.php'); ?>
<?php
session_start();
//Notification instantané de paiment NIP
// lire la publication du système PayPal et ajouter 'cmd'
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
// renvoyer au système PayPal pour 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 ('www.paypal.com', 80, $errno, $errstr, 30);
// affecter les variables publiées aux variables locales
$item_number = $_POST['item_number'];
$txn_id = $_POST['txn_id'];
$num_cart_items = $_POST['num_cart_items'];
$custom = $_POST['custom'];
if (!$fp) {
// ERREUR HTTP
mail_erreur_http($txn_id,$mail);
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
$txn_id = $_POST['txn_id'];
$num_cart_items = $_POST['num_cart_items'];
$custom = $_POST['custom'];
for ($k=1; $k<=$num_cart_items;$k++){
$item_number = $_POST['item_number'.$k.''];
if(($item_number==1)||($item_number==2)||($item_number==6)||($item_number==12)){
//traitement de la tache
$pseudo = mysql_real_escape_string(htmlspecialchars($_SESSION['pseudo']));
$req4 = mysql_query('SELECT * FROM membres WHERE pseudo = "'.$pseudo.'"');
$info_membre = mysql_fetch_array($req4);
$new_points = $info_membre['points'] + 5;
mysql_query('UPDATE membres SET points = "'.$new_points.'" WHERE pseudo = "'.$pseudo.'"');
}}
}
else if (strcmp ($res, "INVALID") == 0) {
mail_erreur_invalid($txn_id,$mail);
}
}
fclose ($fp);
}
?>