Guest Posted October 21, 2002 Posted October 21, 2002 v0.92 (Released 10/21/2002) --------------------------- - Added option to update stock ONLY when the payment is COMPLETE (read IMPORTANT 4 in install.txt) - Fixed bug when updating order_status_history (thanks psychedelik) http://www.oscommerce.com/downloads.php/co...ions,583/type,1 Quote
Guest Posted October 22, 2002 Posted October 22, 2002 Pablo, Great job on this contribution! As mentioned in the email I sent you, the "https://secure.paypal.com" url certificate has expired. The fix I put in that seems to work is changing it to "https://www.paypal.com". For anyone else that wants to make this change, you can find this url in the second to last line in module "checkout_paypalipn.php" in the "catalog" directory. Just change tep_redirect("https://secure.paypal.com/cgi-bin/webscr?cmd... to tep_redirect("https://www.paypal.com/cgi-bin/webscr?cmd... . Hope this helps! Joe. Quote
Guest Posted October 22, 2002 Posted October 22, 2002 Pablo, I've just developed a problem with the code. My shopping cart isn't being cleared out after a purchase. Has anyone else had this problem? Thanks... Joe. Quote
lightanother Posted October 22, 2002 Posted October 22, 2002 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] Quote
Guest Posted October 23, 2002 Posted October 23, 2002 Hi Joe and lightanother Which PayPal IPN are you using? If you are using v0.92, remember to modify the /catalog/includes/classes/order.php file There should be TWO changes Look in the order.txt of the contrib to see those TWO changes. Make sure to change also the line in which the SELECT is made. I hope it helps Best regards Quote
Guest Posted October 23, 2002 Posted October 23, 2002 Pablo, Yes, I've made those changes. I am wondering if the class is being executed. I have another include in this module, but I don't think it is being pulled in. Would you know anything about .htaccess? Would that prevent me from executing this class? Thanks... Joe. Quote
Guest Posted October 23, 2002 Posted October 23, 2002 Hi Joe If the order.php if updated, stock should be working fine. I dont think the .htaccess file can be causing problems Many things can be done with .htacess but if you have not created it I dont think there is the problem. Have you updated all the files from the new release? Best regards Quote
Guest Posted October 23, 2002 Posted October 23, 2002 Thanks Pablo, I am trying a different tac. I am looking at my chmod settings. Currently, I have them set as 755 for the includes. Is that correct? Thanks again! Joe. Quote
lightanother Posted October 24, 2002 Posted October 24, 2002 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 Quote
psychedelik Posted October 24, 2002 Posted October 24, 2002 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? an order is generated with the status of PayPal Processing regardless of whether or not the order is complete. and the whole idea of this contribution is to get around the scenario which people fail to hit continue following their payment. 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. if it's a "complete/paid" order then the information will be sent back to paypal_notify.php and trigger the status update and email sending functions. otherwise the status will show PayPal Processing forever and no emails will be sent. It's impossible to update the statu until after a "complete" transaction, regardless of success or fail. (i.e. information gets sent back to paypal_notify.php) if a customer changes his mind while in PayPal and closes his browser or navigates away, then no information will be sent back to osc. Quote
psychedelik Posted October 24, 2002 Posted October 24, 2002 lightanother, by the way, if you update to 0.92, which contains my no-brainer:P bugfix, it'll do what this contribution was origianlly written to do: 1) for incomplete orders, everything will still be logged with the status showing "PayPal Processing" 2) for completed orders, the status will become "Pending" and emails will be sent. as for dropped orders, everything will still be logged with the status showing "PayPal Processing" until you manually update it to something else or delete it, because the program doesn't get any feedback from PayPal and thinks that the person is still in the process of making a payment. Quote
lightanother Posted October 24, 2002 Posted October 24, 2002 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 Quote
Guest Posted October 24, 2002 Posted October 24, 2002 Hi lightanother I'm only looking for the email that you normal get when someone does hit the continue button. That email should be sended as soon as the order gets status COMPLETED. If your order get that status and the customer is not receiving email, then there is something wrong. Anyway, thats working on my test server, so you should check your configuration and see if everythings ok. 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. The SELECT I was talking about is in the order.php file. There are 2 changes your should do in that file (order.php) best regards Quote
lightanother Posted October 24, 2002 Posted October 24, 2002 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 Quote
Guest Posted October 24, 2002 Posted October 24, 2002 Hi Scot (lightanother) already knows this because I found it thanks to him. The problem with his site was with the PayPal ID he was using. His PayPal ID on PayPal was [email protected] and the one he used in the module was [email protected] (all with lower case). Obviusly it was not HIS problem but my module. That problem will be fixed in the next release, anyway everybody that has problems please make sure to have the right PayPal ID setted on the module Best regards Quote
Guest Posted October 24, 2002 Posted October 24, 2002 Pablo, I think that I have everything working. My problem was two fold... first, I've added quite a bit of code to the paypal_notify.php and some of it wasn't working as it should (I sent in about 100 paypal transactions to find the problem). By the way, is there another way to test this module without having to buy something in the catalog? My second problem was confusion. I thought that if I put an include in the code, it would execute. Well, PHP seems to do a pre-compile on the code and if it doesn't work, it ignores the include. By the way, again, do you know what error logs problems in the paypal_notify.php module would be written? I went through all my logs and wasn't able to find any error messages. Thanks... Joe. Quote
lightanother Posted October 25, 2002 Posted October 25, 2002 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....... Quote
Guest Posted October 25, 2002 Posted October 25, 2002 Light... er, I may call you Light? The only problem I have with that code is that it is done before the payment is accepted. So, if someone was just thinking about checking out, but only makes it to the first paypal screen, their cart will be reset if they go back. Quote
lightanother Posted October 25, 2002 Posted October 25, 2002 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 Quote
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.
Note: Your post will require moderator approval before it will be visible.