Guest peter_lowimpact Posted September 26, 2009 Share Posted September 26, 2009 Hi, I'm new to CC and have been attempting to try out versions 3 and 4, since I am looking for replacement software for a large online shop that I've been running using Actinic for 4 years. I've just done a new install CubeCart_3.0.20 - the installation went fine and the shop functions, but I found a problem with that which is apparently common but the forums failed to solve: when returning from paypal, IPN or standard, after a successful transaction, you get the error message "Error: No payment gateway variable is set!". I have seen this error reported with version 3.0.19 http://forums.cubecart.com/index.php?showtopic=38714 but not solved for the person who reported it. Like him/her, I have the www in my global.inc.php file, and I even tried deleting the line of hashes around the sir william fix in confirmed.inc.php (even though actually the fix was not commented out - a line of ##### above and below is just decoration - but I deleted them just for superstious reasons.) Is there an official solution to this problem? thanks, Peter Quote Link to comment Share on other sites More sharing options...
melemel Posted September 30, 2009 Share Posted September 30, 2009 I am also getting this problem, though customer receives download link in email, and payment is taken succesfully Quote Link to comment Share on other sites More sharing options...
Guest peter_lowimpact Posted October 2, 2009 Share Posted October 2, 2009 I have now installed version 3.0.20 on a different server - I am still getting the SAME PROBLEM! The first server was windows, the second was linux. Just thought I'd try both in case it only happened on windows. Quote Link to comment Share on other sites More sharing options...
Guest michelle2010 Posted December 24, 2009 Share Posted December 24, 2009 I am new user and installed version 3.0.20 on a different server. It has worked fine. You also installed version 3.0.20 and may be your problems solve. :homestar: Quote Link to comment Share on other sites More sharing options...
Martin Lines Posted January 16, 2010 Share Posted January 16, 2010 I am getting exactly the same problem and cannot find a fix? Is anyone getting any help on this subject at all, why should I bother paying for the full version and/or full support when the basic version doesn't work and therefore does not give me any confidence Martin Quote Link to comment Share on other sites More sharing options...
Robsta Posted January 17, 2010 Share Posted January 17, 2010 Have you checked you've set up PayPal correctly? Quote Link to comment Share on other sites More sharing options...
Martin Lines Posted January 17, 2010 Share Posted January 17, 2010 Have you checked you've set up PayPal correctly? Yes - I have checked and rechecked! Quote Link to comment Share on other sites More sharing options...
Martin Lines Posted January 17, 2010 Share Posted January 17, 2010 I have been playing with the code.... The "No Payment Gateway Variable" error comes from confirmed.inc.php, no matter what you do it always thinks that there is no payment gateway variable. I can force the variable to "PayPal" It then carries on to say that your Payment Failed. This is all set up on a test website so I can play/make changes as requested but I am not a programmer CubeCart Version: 3.0.20 PHP Version: 5.2.12 MySQL Version: 5.0.81-log Image upload folder size: 266.6 KB Server Software: Apache Client Browser: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 (.NET CLR 3.5.30729) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2010 Share Posted February 15, 2010 I'm not hugely confident with CubeCart and coding, but I think this is an issue with v19-20. I've been in the process of setting up a store for the last year (I know! other priorities have taken over at times....!) My original installation was V3.18 - I didn't ever get the 'no payment gateway' error. However I did (and still do!) have a problem with digital download links (corrupt) While searching for a solution to the digital download problem, I thought maybe it was because I needed to update my version of CubeCart. Which I have just done. And lo and behold... When I 'tested' the store by posing as a customer and ordering a digital product, not only was the download link corrupt, when I clicked 'return to store' I got the 'no payment gateway' error. If anyone can shed any light on this issue I would be very grateful... (I've already asked for help regarding the downloads in another thread, but any ideas welcome ) Quote Link to comment Share on other sites More sharing options...
Guest surgeterrix Posted June 14, 2010 Share Posted June 14, 2010 I have been playing with the code.... The "No Payment Gateway Variable" error comes from confirmed.inc.php, no matter what you do it always thinks that there is no payment gateway variable. I can force the variable to "PayPal" It then carries on to say that your Payment Failed. This is all set up on a test website so I can play/make changes as requested but I am not a programmer CubeCart Version: 3.0.20 PHP Version: 5.2.12 MySQL Version: 5.0.81-log Image upload folder size: 266.6 KB Server Software: Apache Client Browser: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 (.NET CLR 3.5.30729) PayPal must have changed its variables it sends in the REQUEST to cube cart. This is where it is failing first off: } elseif(isset($_GET['tx']) && isset($_GET['st'])) { $basket['gateway'] = "PayPal"; I did a capture with Live Headers and found that the st and tx variables no longer exist. I do not know what st ever was, but tx was changed by Paypal into txn_id and is no longer sent in the URL string (which a $_GET retrieves) only something called oid (ex: http://www.website.com/confirmed.php?act=c...A1MTkxMS0xOTYw), all the other information is in a POST header. I don't know what st was ever used for but I did not see it used else where other then to verify that it was a PayPal gateway transaction. So I changed the above lines to this: } elseif(isset($_GET['oid']) && isset($_REQUEST['txn_id']) ) { $basket['gateway'] = "PayPal"; But that just gets rid of the "No Payment Gateway" error. You will still get an "order failed". This is because the success method in the PayPal gateway's transfer.inc.php is still trying to use the tx variable. Just go look in modules/gateway/PayPal Change $result = $db->select("SELECT status FROM ".$glob['dbprefix']."CubeCart_order_sum WHERE sec_order_id = ".$db->mySQLSafe($_GET['tx']) ); to $result = $db->select("SELECT status FROM ".$glob['dbprefix']."CubeCart_order_sum WHERE sec_order_id = ".$db->mySQLSafe($_REQUEST['txn_id']) ); Now it will check the order id in the database against the txn_id submitted when you click the "Return to Merchant" link. If they match, the success method will return true and you will get a success message. There is also an 'invoice' variable submitted that contains the Order No and payer_status (which can be checked to see if it is "verified"). 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.