Still not working, but I cannot tell what is not working. My account is in test mode. IPN is enables. I have the encryted URL setting turned OFF (is that correct?). My AlertURL appears to be set correctly. Transactions from my site seem to be behaving correctly, proceeding through with successful payment and I am getting the email notifications from Alertpay. However, I dont think the IPN is firing or am I not capturing anything.
I know a while ago Alertpay askedme to put a verification file on the root of the site, does that have to be there (in the same directory) or something? I dont recall seeing anything about it. I am calling the script as a .php file,is that OK?
I inserted the email code as follows into version 1.1, is this OK?
if ($ap_Status == "Success")
{
// IF DEBUG MODE -> END Transaction has ended successfuly
if ($debug=="1"){fwrite($fh, " Transaction has ended successfuly!
$seperator
");}
// Transaction is complete. It means that the amount was paid successfully.
// Process the order here.
// You can use the $alertpay_data[ to retreive the needed info
$email_ipn_result="info@moresomes.net"; // Your Email
$subject = "AlertPay IPN Data";
$message .= "PHPEcono Advanced IPN v1.2 :$seperator";
$i=0; foreach ($alertpay_data as $line){$message .= '$alertpay_data['.$i.'] = '."$line"; $i++;}
$message .= "$seperator";
PHPEcono_Mailer($subject, $message, $email_ipn_result);
function PHPEcono_Mailer($subject, $message, $to){
GLOBAL $_SESSION;
$to = explode(", ", $to);
while (list ($key, $val) = each ($to)) {
$mime_boundary = "----PHPEcono Advanced IPN 1.1----".md5(time());
$headers = "From: AlertPay IPN <$to>";
$headers .= "Reply-To: AlertPay IPN <$to>";
$headers .= "MIME-Version: 1.0";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"";
$messages .= "--$mime_boundary";
$messages .= "Content-Type: text/html; charset=windows-1252";
$messages .= "Content-Transfer-Encoding: 8bit";
$messages .= "$message";
$messages .= "--$mime_boundary--";
$mail_sent = @mail( $val, $subject, $messages, $headers );
}
}
If I call the script on its own, I get the following error....
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/moresome/public_html/moresomes/ipnprocess3.php on line 3
Parse error: syntax error, unexpected T_STRING in /home/moresome/public_html/moresomes/ipnprocess3.php on line 3
My edit area looks like this currently...
/**//////////////////////////////////////////////////////////////////////////////////
/**/// EDIT BOX //
/**//////////////////////////////////////////////////////////////////////////////////
$test=0; // Test activation
$debug=1; // Change this to 1 for debug mode (Turn off after and delete debug.txt)
$debug_file="debug.txt"; // Debug file name (chmod to 777)
$encrypted_alerurl_pass = "dLvtERshq7htSBWG"; // Encrypted AlertURL pass.
/**/ $server="localhost"; // Server name (Ex: localhost)
/**/ $db_name="name"; // Name of the DB
/**/ $db_username="username"; // username of the db
/**/ $db_password="password"; // password of the db
/**//////////////////////////////////////////////////////////////////////////////////
I have the debug file locates in the same directory as the .php script and its CHMOD 777
Thanks in advance for your help!
Roger