Petit nouveau ! |
3 Messages
20 août 2011, 18:38
Hello à tous ,
je colle ci dessous , la partie de mon script , qui semblerais ne pas être executé .
// End of comment part
if ($p->validate_ipn()) {
$p->debug_log('Creating prodcut Information to send.',true);
// Client has successfully paid for the product
$product_id = $p->ipn_data['item_number'];
$download = $product_id.'|'.$time;
$download_link = $script_location.'download.php?file='.rawurlencode(base64_encode(RC4Crypt::encrypt($secret,$download)));
$tags = array("{first_name}","{last_name}","{payer_email}","{product_name}","{product_link}","{product_price}","{product_id}");
$vals = array($p->ipn_data['first_name'],$p->ipn_data['last_name'],$p->ipn_data['payer_email'],$products[$product_id][0],$download_link,$products[$product_id][1],$product_id);
$subject = str_replace($tags,$vals,$email_subject);
$body = str_replace($tags,$vals,$email_body);
$headers = 'From: '.$download_email . "\r\n";
$attachment = false;
if ($email_attachment) {
$attachment = $products[$product_id][2];
}
// Send Email to the buyer
if(@send_mail($p->ipn_data['payer_email'],$body,$subject,$download_email,$attachment))
{
$p->debug_log('Product Email successfully sent to '.$p->ipn_data['payer_email'].'.',true);
}
else
{
$p->debug_log('Error sending product Email to '.$p->ipn_data['payer_email'].'.',false);
}
// Do some house keeping notify seller ( also for logging )
$n_subject = str_replace($tags,$vals,$notify_subject);
$n_body = str_replace($tags,$vals,$notify_body).
"\n\n-------User Email----------\n".
$body.
"\n\n-------Paypal Parameters---\n".
$p->post_string;
if(@send_mail($notify_email,$n_body,$n_subject,$download_email))
{
$p->debug_log('Notify Email successfully sent to '.$notify_email.'.',true);
}
else
{
$p->debug_log('Error sending notify Email to '.$notify_email.'.',false);
}
// done
}
$p->debug_log('Paypal class finished.',true,true);
?>
Merci d'avance de votre aide

;)
