uberstu3 Posted November 11, 2008 Share Posted November 11, 2008 Hi there, I have installed Paypal IPN v2.2.3 and it was working fine for the first few payments that went through the store and all of a sudden it just stopped updating the order status on orders so that no invoice is sent to the customers and the product quantity is not reduced. I do receive the payment confirmation from Paypal though. I have checked the php.ini file and register_globals is set to on, I have also tried changing various setting on my paypal account however this seems to have made no difference. I have tried to purchase items with auto return on/off which has no effect. I have also tried accessing the ipn.php file and get sent the test email to my debug address. So it does't appear to be a permission problem. I have tried turning IPN on (it was originally off) however this did not work either. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Danhosts Posted November 20, 2008 Share Posted November 20, 2008 Hi there, I have installed Paypal IPN v2.2.3 and it was working fine for the first few payments that went through the store and all of a sudden it just stopped updating the order status on orders so that no invoice is sent to the customers and the product quantity is not reduced. I do receive the payment confirmation from Paypal though. I have checked the php.ini file and register_globals is set to on, I have also tried changing various setting on my paypal account however this seems to have made no difference. I have tried to purchase items with auto return on/off which has no effect. I have also tried accessing the ipn.php file and get sent the test email to my debug address. So it does't appear to be a permission problem. I have tried turning IPN on (it was originally off) however this did not work either. Any help would be greatly appreciated. Does anybody know a solution to this problem? I am having the same problem! Quote Link to comment Share on other sites More sharing options...
iecwillow Posted November 21, 2008 Share Posted November 21, 2008 I got problem in Paypal_Shopping_Cart_IPN and PHP5 too. It happened since I moved the site to another hosting company, the difference as I know is PHP Version changed to 5.2.3, and now the status of my order won't changed, transaction activity always shows: No PayPal Transaction Information Available. I have to check the emails I received from Paypal and manually change the status one by one. Anyone please help? Quote Link to comment Share on other sites More sharing options...
satish Posted November 21, 2008 Share Posted November 21, 2008 Is Your IPN file is place. Are IPNS being received. Chek notify url path. Satish Mantri Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
ejwords Posted November 22, 2008 Share Posted November 22, 2008 Is Your IPN file is place.Are IPNS being received. Chek notify url path. Satish Mantri Hello Satish. I am having the same problem - I have set up & am using paypal websites standard to accept payments and I get a notification from paypal, but no email to say I have a order from oSCommerce.. When I look at the order, this is the status.. |Date Added | Customer Notified | Status | Comments | |11/21/2008 14:31:03 | X | Preparing [PayPal Standard] | | |11/21/2008 14:31:03 | X | Processing PayPal |IPN Verified [Completed (Verified; $54.95)] | Where am I supposed to find the IPN file? Is this something I needed to add? How do I tell if my IPN's are being received? All the best. Quote Link to comment Share on other sites More sharing options...
satish Posted November 22, 2008 Share Posted November 22, 2008 |11/21/2008 14:31:03 | X | Processing PayPal |IPN Verified [Completed (Verified; $54.95)] | means IPN was recd. Check if images reaching Your bulk or getting filtered and not reaching Your email box. Or some different email address set where the IPN generated emails are being sent. Satish Mantri Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
iecwillow Posted November 22, 2008 Share Posted November 22, 2008 Is Your IPN file is place.Are IPNS being received. Chek notify url path. Satish Mantri Just noticedthat I am actually using Paypal_Shopping_Cart_IPN V3.1.5, I can only received Notification of Payment Received Email from Paypal without Invoice ID. My friend's site on other hosting company using same modules on PHP Version: 4.4.8 without any issue. He can receive another PayPal_Shopping_Cart_IPN Debug Notification Email when the Paypal payment completed. Do you know what changes I should to make to fix this problem? Thanks for your attention. Quote Link to comment Share on other sites More sharing options...
ejwords Posted November 22, 2008 Share Posted November 22, 2008 |11/21/2008 14:31:03 | X | Processing PayPal |IPN Verified [Completed (Verified; $54.95)] | means IPN was recd. Check if images reaching Your bulk or getting filtered and not reaching Your email box. Or some different email address set where the IPN generated emails are being sent. Satish Mantri Thanks for the reply Satish. I assumed that seen as I am not getting osCommerce to send notifications out, that the Paypal IPN process was not working properly. I get notifications for other payment modules such as Check/Money order. After first setting up the whole site & testing with the sandbox account, the order process sent a notice to the customer & also to the store admin email. At the moment, the order process does not send out notifications to either the customer or the store admin (as can be seen by the 'X' in the customer notified field on the order status screen. How can I get these notifications to work again? Quote Link to comment Share on other sites More sharing options...
iecwillow Posted November 22, 2008 Share Posted November 22, 2008 Just noticedthat I am actually using Paypal_Shopping_Cart_IPN V3.1.5, I can only received Notification of Payment Received Email from Paypal without Invoice ID. My friend's site on other hosting company using same modules on PHP Version: 4.4.8 without any issue. He can receive another PayPal_Shopping_Cart_IPN Debug Notification Email when the Paypal payment completed. Do you know what changes I should to make to fix this problem? Thanks for your attention. Just received the following notice from Paypal: Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing: ipn.php If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account. Thank you for your prompt attention to this issue. Can you please take a look at my ipn.php? Here is the code: <?php /* $Id: ipn.php,v 1.1.1.1 2004/09/22 13:45:11 devosc Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com DevosC, Developing open source Code http://www.devosc.com Copyright (c) 2003 osCommerce Copyright (c) 2004 DevosC.com Released under the GNU General Public License */ /* function debugWriteFile($str,$mode="a") { $fp = @fopen("ipn.txt",$mode); @flock($fp, LOCK_EX); @fwrite($fp,$str); @flock($fp, LOCK_UN); @fclose($fp); } $postString = ''; foreach($_POST as $key => $val) $postString .= $key.' = '.$val."\n"; if($postString != '') { debugWriteFile($postString,"w+"); } */ require_once('includes/modules/payment/paypal/application_top.inc.php'); require_once(DIR_WS_MODULES . 'payment/paypal/classes/IPN/IPN.class.php'); require_once(DIR_WS_MODULES . 'payment/paypal/classes/Debug/Debug.class.php'); require_once(DIR_WS_MODULES . 'payment/paypal/functions/general.func.php'); paypal_include_lng(DIR_WS_MODULES . 'payment/paypal/languages/', 'english', 'ipn.lng.php'); $debug = new PayPal_Debug(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL, MODULE_PAYMENT_PAYPAL_IPN_DEBUG); $ipn = new PayPal_IPN($_POST); $ipn->setTestMode(MODULE_PAYMENT_PAYPAL_IPN_TEST_MODE); unset($_POST); //post back to PayPal to validate if(!$ipn->authenticate(MODULE_PAYMENT_PAYPAL_DOMAIN) && $ipn->testMode('Off')) $ipn->dienice('500'); //Check both the receiver_email and business ID fields match if (!$ipn->validateReceiverEmail(MODULE_PAYMENT_PAYPAL_ID,MODULE_PAYMENT_PAYPAL_BUSINESS_ID)) $ipn->dienice('500'); if($ipn->uniqueTxnID() && $ipn->isReversal() && strlen($ipn->key['parent_txn_id']) == 17) { //parent_txn_id is the txn_id of the original transaction $txn = $ipn->queryTxnID($ipn->key['parent_txn_id']); if(!empty($txn)) { $ipn->insert($txn['paypal_id']); // update the order's status switch ($ipn->reversalType()) { case 'Canceled_Reversal': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID; break; case 'Reversed': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID; break; case 'Refunded': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_REFUNDED_STATUS_ID; break; } $ipn->updateOrderStatus($txn['paypal_id'],$order_status); } } elseif ($ipn->isCartPayment() && !empty($PayPal_osC_Order->orderID)) { //actually not essential since 'orders_status_name' is not required $languages_id = $PayPal_osC_Order->languageID; include(DIR_WS_CLASSES . 'order.php'); $order = new order($PayPal_osC_Order->orderID); //Check that txn_id has not been previously processed if ($ipn->uniqueTxnID()) { //Payment is either Completed, Pending or Failed $ipn->insert(); $PayPal_osC_Order->setOrderPaymentID($ipn->ID()); $PayPal_osC_Order->removeCustomersBasket($order->customer['id']); switch ($ipn->paymentStatus()) { case 'Completed': if ($ipn->validPayment($PayPal_osC_Order->payment_amount,$PayPal_osC_Order->payment_currency)) { include(DIR_WS_MODULES . 'payment/paypal/catalog/checkout_update.inc.php'); } else { $ipn->updateOrderStatus($ipn->ID(),MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID); } break; case 'Failed': $ipn->updateOrderStatus($ipn->ID(),MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID); break; case 'Pending': //Assumed to do nothing since the order is initially in a Pending ORDER Status break; }//end switch } else { // not a unique transaction => Pending Payment //Assumes there is only one previous IPN transaction $pendingTxn = $ipn->queryPendingStatus($ipn->txnID()); if ($pendingTxn['payment_status'] === 'Pending') { $ipn->updateStatus($pendingTxn['paypal_id']); switch ($ipn->paymentStatus()) { case 'Completed': if ($ipn->validPayment($PayPal_osC_Order->payment_amount,$PayPal_osC_Order->payment_currency)) { include(DIR_WS_MODULES . 'payment/paypal/catalog/checkout_update.inc.php'); } else { $ipn->updateOrderStatus($pendingTxn['paypal_id'],MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID); } break; case 'Denied': $ipn->updateOrderStatus($pendingTxn['paypal_id'],MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID); break; }//end switch }//end if Pending Payment } } elseif ($ipn->isAuction()) { if ($ipn->uniqueTxnID()) $ipn->insert(); if ($debug->enabled) $debug->add(PAYPAL_AUCTION,sprintf(PAYPAL_AUCTION_MSG)); } elseif ($ipn->txnType('send_money')) { if ($ipn->uniqueTxnID()) $ipn->insert(); if ($debug->enabled) $debug->add(PAYMENT_SEND_MONEY_DESCRIPTION,sprintf(PAYMENT_SEND_MONEY_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency'])); } elseif ($debug->enabled && $ipn->testMode('On')) { $debug->raiseError(TEST_INCOMPLETE,sprintf(TEST_INCOMPLETE_MSG),true); } if ($ipn->testMode('On') && $ipn->validDigest()) { include(DIR_WS_MODULES . 'payment/paypal/classes/Page/Page.class.php'); $page = new PayPal_Page(); $page->setBaseDirectory(DIR_WS_MODULES . 'payment/paypal/'); $page->setBaseURL(DIR_WS_MODULES . 'payment/paypal/'); $page->includeLanguageFile('admin/languages','english','paypal.lng.php'); $page->setTitle(HEADING_ITP_RESULTS_TITLE); $page->setContentFile(DIR_WS_MODULES . 'payment/paypal/admin/TestPanel/Results.inc.php'); $page->addCSS($page->baseURL . 'templates/css/general.css'); $page->addCSS($page->baseURL . 'templates/css/stylesheet.css'); $page->setTemplate('default'); include($page->template()); } require(DIR_WS_MODULES . 'payment/paypal/application_bottom.inc.php'); ?> Thanks.... Quote Link to comment Share on other sites More sharing options...
iecwillow Posted November 22, 2008 Share Posted November 22, 2008 (edited) Duplicated, deleted Edited November 22, 2008 by iecwillow Quote Link to comment Share on other sites More sharing options...
iecwillow Posted November 22, 2008 Share Posted November 22, 2008 Just noticedthat I am actually using Paypal_Shopping_Cart_IPN V3.1.5, I can only received Notification of Payment Received Email from Paypal without Invoice ID. My friend's site on other hosting company using same modules on PHP Version: 4.4.8 without any issue. He can receive another PayPal_Shopping_Cart_IPN Debug Notification Email when the Paypal payment completed. Do you know what changes I should to make to fix this problem? Thanks for your attention. Just received the following notice from Paypal: Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing: ipn.php If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account. Thank you for your prompt attention to this issue. Can you please take a look at my ipn.php? Here is the code: <?php /* $Id: ipn.php,v 1.1.1.1 2004/09/22 13:45:11 devosc Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com DevosC, Developing open source Code http://www.devosc.com Copyright (c) 2003 osCommerce Copyright (c) 2004 DevosC.com Released under the GNU General Public License */ /* function debugWriteFile($str,$mode="a") { $fp = @fopen("ipn.txt",$mode); @flock($fp, LOCK_EX); @fwrite($fp,$str); @flock($fp, LOCK_UN); @fclose($fp); } $postString = ''; foreach($_POST as $key => $val) $postString .= $key.' = '.$val."\n"; if($postString != '') { debugWriteFile($postString,"w+"); } */ require_once('includes/modules/payment/paypal/application_top.inc.php'); require_once(DIR_WS_MODULES . 'payment/paypal/classes/IPN/IPN.class.php'); require_once(DIR_WS_MODULES . 'payment/paypal/classes/Debug/Debug.class.php'); require_once(DIR_WS_MODULES . 'payment/paypal/functions/general.func.php'); paypal_include_lng(DIR_WS_MODULES . 'payment/paypal/languages/', 'english', 'ipn.lng.php'); $debug = new PayPal_Debug(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL, MODULE_PAYMENT_PAYPAL_IPN_DEBUG); $ipn = new PayPal_IPN($_POST); $ipn->setTestMode(MODULE_PAYMENT_PAYPAL_IPN_TEST_MODE); unset($_POST); //post back to PayPal to validate if(!$ipn->authenticate(MODULE_PAYMENT_PAYPAL_DOMAIN) && $ipn->testMode('Off')) $ipn->dienice('500'); //Check both the receiver_email and business ID fields match if (!$ipn->validateReceiverEmail(MODULE_PAYMENT_PAYPAL_ID,MODULE_PAYMENT_PAYPAL_BUSINESS_ID)) $ipn->dienice('500'); if($ipn->uniqueTxnID() && $ipn->isReversal() && strlen($ipn->key['parent_txn_id']) == 17) { //parent_txn_id is the txn_id of the original transaction $txn = $ipn->queryTxnID($ipn->key['parent_txn_id']); if(!empty($txn)) { $ipn->insert($txn['paypal_id']); // update the order's status switch ($ipn->reversalType()) { case 'Canceled_Reversal': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID; break; case 'Reversed': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID; break; case 'Refunded': $order_status = MODULE_PAYMENT_PAYPAL_ORDER_REFUNDED_STATUS_ID; break; } $ipn->updateOrderStatus($txn['paypal_id'],$order_status); } } elseif ($ipn->isCartPayment() && !empty($PayPal_osC_Order->orderID)) { //actually not essential since 'orders_status_name' is not required $languages_id = $PayPal_osC_Order->languageID; include(DIR_WS_CLASSES . 'order.php'); $order = new order($PayPal_osC_Order->orderID); //Check that txn_id has not been previously processed if ($ipn->uniqueTxnID()) { //Payment is either Completed, Pending or Failed $ipn->insert(); $PayPal_osC_Order->setOrderPaymentID($ipn->ID()); $PayPal_osC_Order->removeCustomersBasket($order->customer['id']); switch ($ipn->paymentStatus()) { case 'Completed': if ($ipn->validPayment($PayPal_osC_Order->payment_amount,$PayPal_osC_Order->payment_currency)) { include(DIR_WS_MODULES . 'payment/paypal/catalog/checkout_update.inc.php'); } else { $ipn->updateOrderStatus($ipn->ID(),MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID); } break; case 'Failed': $ipn->updateOrderStatus($ipn->ID(),MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID); break; case 'Pending': //Assumed to do nothing since the order is initially in a Pending ORDER Status break; }//end switch } else { // not a unique transaction => Pending Payment //Assumes there is only one previous IPN transaction $pendingTxn = $ipn->queryPendingStatus($ipn->txnID()); if ($pendingTxn['payment_status'] === 'Pending') { $ipn->updateStatus($pendingTxn['paypal_id']); switch ($ipn->paymentStatus()) { case 'Completed': if ($ipn->validPayment($PayPal_osC_Order->payment_amount,$PayPal_osC_Order->payment_currency)) { include(DIR_WS_MODULES . 'payment/paypal/catalog/checkout_update.inc.php'); } else { $ipn->updateOrderStatus($pendingTxn['paypal_id'],MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID); } break; case 'Denied': $ipn->updateOrderStatus($pendingTxn['paypal_id'],MODULE_PAYMENT_PAYPAL_ORDER_CANCELED_STATUS_ID); break; }//end switch }//end if Pending Payment } } elseif ($ipn->isAuction()) { if ($ipn->uniqueTxnID()) $ipn->insert(); if ($debug->enabled) $debug->add(PAYPAL_AUCTION,sprintf(PAYPAL_AUCTION_MSG)); } elseif ($ipn->txnType('send_money')) { if ($ipn->uniqueTxnID()) $ipn->insert(); if ($debug->enabled) $debug->add(PAYMENT_SEND_MONEY_DESCRIPTION,sprintf(PAYMENT_SEND_MONEY_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency'])); } elseif ($debug->enabled && $ipn->testMode('On')) { $debug->raiseError(TEST_INCOMPLETE,sprintf(TEST_INCOMPLETE_MSG),true); } if ($ipn->testMode('On') && $ipn->validDigest()) { include(DIR_WS_MODULES . 'payment/paypal/classes/Page/Page.class.php'); $page = new PayPal_Page(); $page->setBaseDirectory(DIR_WS_MODULES . 'payment/paypal/'); $page->setBaseURL(DIR_WS_MODULES . 'payment/paypal/'); $page->includeLanguageFile('admin/languages','english','paypal.lng.php'); $page->setTitle(HEADING_ITP_RESULTS_TITLE); $page->setContentFile(DIR_WS_MODULES . 'payment/paypal/admin/TestPanel/Results.inc.php'); $page->addCSS($page->baseURL . 'templates/css/general.css'); $page->addCSS($page->baseURL . 'templates/css/stylesheet.css'); $page->setTemplate('default'); include($page->template()); } require(DIR_WS_MODULES . 'payment/paypal/application_bottom.inc.php'); ?> Thanks.... Quote Link to comment Share on other sites More sharing options...
satish Posted November 23, 2008 Share Posted November 23, 2008 place some file write code or open these lines /* function debugWriteFile($str,$mode="a") { $fp = @fopen("ipn.txt",$mode); @flock($fp, LOCK_EX); @fwrite($fp,$str); @flock($fp, LOCK_UN); @fclose($fp); } $postString = ''; foreach($_POST as $key => $val) $postString .= $key.' = '.$val."\n"; if($postString != '') { debugWriteFile($postString,"w+"); } */ see if some file gets generated if yes then what post variables are coming. This will means IPNs are coming. then You need to check the authentification code part. Satish Mantri Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
iecwillow Posted November 24, 2008 Share Posted November 24, 2008 place some file write code or open these lines /* function debugWriteFile($str,$mode="a") { $fp = @fopen("ipn.txt",$mode); @flock($fp, LOCK_EX); @fwrite($fp,$str); @flock($fp, LOCK_UN); @fclose($fp); } $postString = ''; foreach($_POST as $key => $val) $postString .= $key.' = '.$val."\n"; if($postString != '') { debugWriteFile($postString,"w+"); } */ see if some file gets generated if yes then what post variables are coming. This will means IPNs are coming. then You need to check the authentification code part. Satish Mantri Not quite understand how to place some file write code or open these lines, however, I received another email from Paypal saying: After checking with technician about IPN issue, I was notified that they found you set incorrect value for the variable 'notify_url', the value you are using at this moment is 'ipn.php' ,which obviously is not a complete and valid URL. Besides, the URL for both variable 'return' and 'cancel_return' are invalid. So some variables are missing at your site, as a result, you send a relative address instead of the absolute address in this case. You need to fix it at your side. Please try to contact third party provider to work out the issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.