besoins d'aides sur utilisation d'un script php

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.

  Revue du sujet
 

  Étendre la vue Revue du sujet : besoins d'aides sur utilisation d'un script php

Re: besoins d'aides sur utilisation d'un script php

par talanwork » 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 ;);) :o :shock:

besoins d'aides sur utilisation d'un script php

par talanwork » 19 août 2011, 18:35

Bonjour, à tous ,

Je ne suis pas trés calé php , et j'utilise un script distribué en open sources pour installé un système de download de mp3 après paiement paypal , le client reçois par mail le liens de downloads qui est crypté et valable 24 h.
Voila pour le concept , j'ai réussi à integré le script, dans le site , et j'arrive à tester dans le sandbox paypal et tout ce passe bien jusqu'à la fin du paiement , et l'étape cruciale , le mail n'est pas envoyé pour le téléchargement .

Si quelqu'un à une idée , ça m'aiderait énormément .

Merci d'avance de vos réponses :)