Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

lightanother

Archived
  • Posts

    28
  • Joined

  • Last visited

Profile Information

lightanother's Achievements

  1. Pablo, I added the snippit of code and ran some test. Everything appears to be working now correctly. Thank you very, very much. I was getting tired of answering all of the emails about the failed payment. I want to throw a little money your way for all of the hard work, updates and the personal help you have done for me. Let me know what email address I should use. Thanks, Scot www.LightAnother.com - your online smoke store
  2. Pablo, Hello and thanks for the snippit of code. I am adding it now and will test it for a little bit. Will let you know how it works on my site. Thanks, Scot www.LightAnother.com - your online smoke store
  3. Pablo, Here is the source code: <?php /* $Id: checkout_success.php,v 1.35 2002/07/21 23:38:57 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS); // PayPal IPN add **************************************** $paypalipn_query = tep_db_query("select o.orders_status,p.* from " . TABLE_ORDERS . " o LEFT JOIN paypalipn_txn p on p.item_number = o.orders_id AND o.customers_id = '" . $customer_id . "' order by o.date_purchased desc limit 1"); $paypalipn = tep_db_fetch_array($paypalipn_query); if ($paypalipn['ipn_result']=='VERIFIED') { if ($paypalipn['payment_status']=='Completed') { $NAVBAR_TITLE_2 = PAYPAL_NAVBAR_TITLE_2_OK; $HEADING_TITLE = PAYPAL_HEADING_TITLE_OK; $TEXT_SUCCESS = PAYPAL_TEXT_SUCCESS_OK; } else if ($paypalipn['payment_status']=='Pending') { $NAVBAR_TITLE_2 = PAYPAL_NAVBAR_TITLE_2_PENDING; $HEADING_TITLE = PAYPAL_HEADING_TITLE_PENDING; $TEXT_SUCCESS = PAYPAL_TEXT_SUCCESS_PENDING; }; $cart->reset(TRUE); } else if ($paypalipn['ipn_result']=='INVALID' || $paypalipn['orders_status']==99999) { $NAVBAR_TITLE_2 = PAYPAL_NAVBAR_TITLE_2_FAILED; $HEADING_TITLE = PAYPAL_HEADING_TITLE_FAILED; $TEXT_SUCCESS = PAYPAL_TEXT_SUCCESS_FAILED; } else { $NAVBAR_TITLE_2 = NAVBAR_TITLE_2; $HEADING_TITLE = HEADING_TITLE; $TEXT_SUCCESS = TEXT_SUCCESS; }; // EOF - PayPal IPN add **************************************** $breadcrumb->add(NAVBAR_TITLE_1); // PayPal IPN change from (blow) to (bolow it) // $breadcrumb->add(NAVBAR_TITLE_2); $breadcrumb->add($NAVBAR_TITLE_2); $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'"); $global = tep_db_fetch_array($global_query); if ($global['global_product_notifications'] != '1') { $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . $customer_id . "' order by date_purchased desc limit 1"); $orders = tep_db_fetch_array($orders_query); $products_array = array(); $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $orders['orders_id'] . "' order by products_name"); while ($products = tep_db_fetch_array($products_query)) { $products_array[] = array('id' => $products['products_id'], 'text' => $products['products_name']); } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // BOF: WebMakers.com Changed: Header Tag Controller v1.0 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE ?></title> <?php } // EOF: WebMakers.com Changed: Header Tag Controller v1.0 ?> <base href="<?php echo (getenv('../../../HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <script language="javascript1.2"><!-- EXs=screen;EXw=EXs.width;navigator.appName!="Netscape"? EXb=EXs.colorDepth:EXb=EXs.pixelDepth;//--> </script><script language="javascript"><!-- EXd=document;EXw?"":EXw="na";EXb?"":EXb="na"; EXd.write("<img src="http://t0.extreme-dm.com", "/0.gif?tag=godiva11&j=y&srw="+EXw+"&srb="+EXb+"&", "l="+escape(EXd.referrer)+"" height=1 width=1>");//--> </script><noscript><img height=1 width=1 alt="" src="http://t0.extreme-dm.com/0.gif?tag=godiva11&j=n"></noscript> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><form name="order" <?php echo 'action="' . tep_href_link(FILENAME_DEFAULT, 'action=notify') . '"'; ?> method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="4" cellpadding="2"> <tr> <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', $HEADING_TITLE); ?></td> <td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo $HEADING_TITLE; ?></div><br><?php echo $TEXT_SUCCESS; ?><br><br> <?php if ($global['global_product_notifications'] != '1') { echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">'; for ($i=0; $i<sizeof($products_array); $i++) { echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>'; } echo '</p>'; } else { echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER; } ?> <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="checkoutBar">[ <?php echo CHECKOUT_BAR_DELIVERY_ADDRESS; ?> | <?php echo CHECKOUT_BAR_PAYMENT_METHOD; ?> | <?php echo CHECKOUT_BAR_CONFIRMATION; ?> | <span class="checkoutBarHighlighted"><?php echo CHECKOUT_BAR_FINISHED; ?></span> ]</td> </tr> <?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_BOXES . 'downloads.php'); ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Everything looked good to me. The payment status from paypal wound be "unclaimed" and not pending I believe. If that is the case, then it would show failed, correct? Forgive me,because I do not know php programming too well. Thanks, Scot
  4. Pablo, They appear as paypal processing untill you go to paypal and manually accept their payment. Then it goes to pending and an email is sent out. Maybe I might not have said it clearly, so I will retry. Your contri works great. It just on a unverified ship to address, OSC will give a fail when they hit continue from making a payment. So I don't know if the code being sent back is causing the fail or if a non-ipn trasaction will do the same. I haven't had a chance to test it myself on a non-ipn transaction to see if the same fail screen comes up or if a success screen comes up. Thanks, Scot
  5. Pablo, Yes, everything is running good. Thank you again very much for your assistance. I have noticed a few orders that have gone through with unconfirmed shipping address, will get a fail when being sent back to the site. Is this normal or a possible bug? As soon as we accept their payment, then the order notification is sent which is fine. Thanks, Scot
  6. Pablo, Everything was running fine till this past Monday. I don't know what happend, but I am no longer getting order emails. The customer is not receiving order emails as well. I have noticed that PayPal is kicking back to the site for the paypal_notify, but no records are being written and the order stays in paypal processing status. There have been no programming updates done on the site for 3-4 weeks now. I am running OSC ver 2.2 and was running your IPN V092. I tried manually entering records in the paypalipn_tn to see if there might be a problem there. Ran some test, but did not create any new records nor any emails. I then dropped the records in both the paypalipn_tn and paypalipn_tmp_data, ran some tests and still nothing. I did upgrade tonight to IPN V095 (old checkout code) thinking that might fix the problem. Ran some more test and still nothing. It is logging the order and adding records to the paypalipn_temp_data, just no records to the paypalipn_tn. website is http://www.LightAnother.com Thanks, Scot
  7. Joe, You can call me what ever you wish, as long as you don't call me late for dinner! lol You have a point there, I didn't even take that into consideration. .....back to the drawing board....lol
  8. Pablo and Joe, I was doing some test on why the shopping cart was not empty after the transaction. I think a small piece of code was missed. I have tested it on my site and the cart is now empty afterwards. Take a look at the code in checkout_paypalipn.php around line 270 Original as Pablo had it: // load the after_process function from the payment modules $payment_modules->after_process(); // unregister session variables used during checkout Try adding this to the code so it looks like this: // load the after_process function from the payment modules $payment_modules->after_process(); $cart->reset(TRUE); // unregister session variables used during checkout It works for me.......
  9. Pablo, Here is my code on my order.php: // PayPal IPN Change // $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . tep_db_input($order_id) . "'"); $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . tep_db_input($order_id) . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price'],// PayPal IPN this was moved down ); and a comma was put in 'id' => $orders_products['products_id']); // PayPal IPN Line added I just did two tests to verify this. Both test did not generate an order email. Here is the output on the PayPal IPN transaction screen (I have masked some information below that is not important, but the information is correct as output): TXN ID: 3E645292KN2269614 IPN Result: VERIFIED Receiver Email: [email protected] Item Name: LightAnother.com - your online smoke store Item Number: 1902 Quantity: 1 Invoice: Custom: Option Name 1: Option Selection 1: Option Name 2: Option Selection 2: Num Cart Items: 0 Payment Status: Completed Pending Reason: Payment Date: 10:57:59 Oct 24, 2002 PDT Payment Gross: 17.0000 Payment Fee: 0.6700 MC Gross: 17.0000 MC Fee: 0.6700 MC Currency: USD TXN Type: web_accept First Name: ********* Last Name: ********** Address Street: ******** Address City: ******** Address State: ******** Address Zip: ******* Address Country: ******** Address Status: confirmed Payer Email: *************** Payer ID: ************** Payer Status: unverified Payment Type: instant Notify Version: 1.4 Verify Sign: AlG6Hmdm8azwR9jmAZBSTeGVvbbAAIm3GsJvc-lnt2k-q3p5dndsR-oC So am I doing something wrong, is there something I need to do to generate the order email, or am I just out of my mind (which isn't far fetched). Thanks
  10. Okay, maybe I wasn't expaining myself correctly. I will try again. I did not do an upgrade, only installed V0.92. So as to the no brainer bugfix, that is not the situation. Once a customer has paid for their order and has not hit continue, that the store owner receives the normal "order process" email. Unless I updated something wrong, I receive no email except for Paypals pmt notification when I was testing this. The orders are listed in admin PayPal IPN transaction box. I'm only looking for the email that you normal get when someone does hit the continue button. Thanks
  11. Pablo, I am using your latest version V0.92. I looked at the order.php and everything checks out. I assume that the select you are talking about is the checkout_sucess.php. That is correct with what you had listed as well. So I'm still at a loss as to what else to look for. Also, any ideas on my other question to you about having an order generated if they didn't hit continue and then emailed to the store owner? Then if it is a real order we could just forward the email on to the customer and if it is not, then we could change the order to a cancelled status. Thanks
  12. Joej, I just installed the mod and just saw that as well. Mine is doing the same thing. I have disabled the IPN for now until a patch is set. I was going to post this by itself, but I will list it here. Pablo, Love your contrib. You can also list my site in your .txt file if you wish (http://www.LightAnother.com). Would it be possible to generate an order as soon as everything is logged and then have it emailed to the store owner? If it does turn into an order, we would be able to just forward the email to the customer. Or am I missing something in your contrib? I see it generates an order, but I do not receive an email of it if they don't hit that damn continue button other than paypals pmt notification email. Thanks[/url]
×
×
  • Create New...