multimixer, on 31 March 2010, 13:33, said:
Hi Jim
I can not say tat I have any experience with paypal IPN, I never used it and I also don't know exactly how it works. So I can only help with thinking in the same direction as you do
I don't think that the issue is particularly email related, because all other emails and all other confirmations work fine. So I would concentrate on the paypal process
That was my thought, something went wrong with the paypal process.
Quote
Things I would check are
1) Is the order getting registered in the DB? Do you see it in admin? (Not sure if the IPN module writes the order to the DB before or after the paypal visit, do you know this? )
Yes the order gets registered in the DB, can see it in admin. The paypal IPN was designed to hold the order info before the customer leaves the site to head for paypal to finish the process.
Quote
2) What is the "return" page of paypal to your store? Is it checkout_process.php? Or is it an other file? Does this file has a separate mail function? (like ie paypal_standard.php)
Yes it returns to the checkout_process.php.
I double checked the Includes > modules > payment > paypal_ipn.php (no email coding) and the ext > modules > payment > paypal_ipn > ipn.php (email coding) and I had made the neccessary edits as was made in the checkout_process.php as stated in the IPN directions regarding contributions.
Here's the relevant code:
// EOF content type fix by AlexStudio
// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class
//--- Beginning of addition: Ultimate HTML Emails ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/checkout_process.php');
$email_order = $html_email;
}else{//Send text email
//--- End of addition: Ultimate HTML Emails ---//
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $invoice_id . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $invoice_id, 'SSL', false) . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
// BOF order comment fix by AlexStudio
if ($comments) {
$email_order .= $comments . "\n\n";
}
// EOF order comment fix by AlexStudio
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
EMAIL_SEPARATOR . "\n" .
$products_ordered .
EMAIL_SEPARATOR . "\n";
for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {
$email_order .= strip_tags($order->totals[$i]['title']) . ' ' . strip_tags($order->totals[$i]['text']) . "\n";
}
// BOF content type fix by AlexStudio
if ($content_type != 'virtual') {
// EOF content type fix by AlexStudio
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
EMAIL_SEPARATOR . "\n" .
tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n") . "\n";
}
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
EMAIL_SEPARATOR . "\n" .
tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n") . "\n\n";
if (is_object($$payment)) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR . "\n";
$payment_class = $$payment;
$email_order .= $payment_class->title . "\n\n";
if ($payment_class->email_footer) {
$email_order .= $payment_class->email_footer . "\n\n";
}
}
//--- Beginning of addition: Ultimate HTML Emails ---//
}
if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
$TheFileName = 'Last_mail_from_checkout_process.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_order);
fclose($TheFileHandle);
}
//--- End of addition: Ultimate HTML Emails ---//
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
} // END STATUS == COMPLETED LOOP
if ($_POST['payment_status'] == 'Pending') { // START STATUS == PENDING LOOP
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $invoice_id . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $invoice_id, 'SSL', false) . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_PAYPAL_PENDING_NOTICE . "\n\n";
tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
} // END STATUS == PENDING LOOP
Quote
3) Does the customer get the email? I guess not
No, neither customer or store owner.
Quote
This all goes to the direction, that maybe the email sending process is not getting activated at all for paypal payments. But thats just an idea, the issue can be something totally different
I'm sorry that I can not give a real answer
No problem George. I appreciate the reply anyway.
What has me really stumped and confussed is that on my end (osCommerce files or settings) nothing has changed since it was working about a month ago.
I'll head off and study the PayPal IPN thread and bug my host. Maybe a finger can get pointed as to where the problem might be!?!
Thanks again for at least trying. [img]http://forums.oscommerce.com/public/style_emoticons/default/wink.gif[/img]