Payment Method required CCD info even if you select another payment type

I have upgraded to 2.2.4 and been testing to make sure all works well.



When I (as a customer) place and order and go to checkout all is fine until I get to the ‘Select a payment Method’ screen. I seem to be OK if I choose credit card, but if I choose Paypal, check or something other than credit card it still errors that I need to fill in all credit card fields.



My screen options are

Credit card

Paypal

Check

Phone Ordering



I am not a programmer, but I am assuming there is something configured wrong someplace. any help would be appreciated!



Oh, and I am using Firefox as my browser.



Thanks



Mark[attachment=5161:Payment method error.jpg]

Payment method error.jpg

My web guy sent me these errors in case they would be helpful to anyone with this issue. (again, I'm not a programmer, so I am hoping it is a simple configuration thing) Thanks again!

(I have replaced all “https” with “http$” to remove links and show full text here)



Apr 28 23:43:56 market apache2[1179]:

[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:43:56 market apache2[1179]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:43:56 market apache2[1179]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:45:30 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:45:30 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:45:30 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:46:57 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:46:57 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:46:57 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:10 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:10 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:10 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:30 market apache2[1179]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:30 market apache2[1179]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:30 market apache2[1179]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:46 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:46 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:47:46 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:07 market apache2[1179]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:07 market apache2[1179]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:07 market apache2[1179]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:09 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:09 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:48:09 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:14 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:14 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:14 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:23 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:23 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:23 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:37 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:37 market apache2[1178]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:37 market apache2[1178]: [error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:51 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Invalid callback Session::write, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:51 market apache2[1182]: [error] [client 127.0.0.1] PHP Warning: Invalid callback Session::close, class 'Session' not found in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

Apr 28 23:49:51 market apache2[1182]:



[error] [client 127.0.0.1] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/domain/www.witchwynds.com/web/sess) in Unknown on line 0, referer: http$//www.witchwynds.com/index.php?dispatch=checkout.checkout

IT looks like you're using the cc.tpl file for your other payment methods when you probably want the cc_offline.tpl template (or similar name).

Thank you for the suggestion. I tried it without success however.



I changed the template to cc_outside.tpl, I can then move on to choose another method, but when I choose 'Paypal' (or any other method), the following screen still shows payment method as 'Credit Card', also it never goes on to follow through at the Paypal site.

Also, even if I do select 'credit card' it never ask for the credit card info if I use the cc_outside.tpl.



Also I noticed that if I do complete an order and place a new order, it does not clear my previously purchased items from the cart, it adds them to my new order!



Any other ideas? This is baffling!

This is additional information from my web guy, I don't have a clue what it means, but I am sure most of you do. Could his 'patch' to prepare.php be my problem?



WitchWynds (our site) is on a fairly typical reverse-proxy setup:



It consists of lighttpd, sitting in front, serving requests for static content (images, etc.–determined by file extension) and handling keep-alives and SSL. Everything else gets proxied to the backend, apache2.



This necessitated a small patch to prepare.php, which follows:



— prepare-orig.php 2012-04-08 01:47:24.000000000 +0000

+++ prepare.php 2012-04-08 01:46:47.000000000 +0000

@@ -38,6 +38,8 @@

define('HTTPS', true);

} elseif (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && ($_SERVER['HTTP_X_FORWARDED_SERVER'] == 'secure' || $_SERVER['HTTP_X_FORWARDED_SERVER'] == 'ssl')) {

define('HTTPS', true);

+} elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')) {

  •  define('HTTPS', true);

} elseif (isset($_SERVER['SCRIPT_URI']) && (substr($_SERVER['SCRIPT_URI'], 0, 5) == 'https')) {

define('HTTPS', true);

} elseif (isset($_SERVER['HTTP_HOST']) && (strpos($_SERVER['HTTP_HOST'], ':443') !== false)) {

Then you need to work with your host or the developer who is making changes to ensure they fully understand the impact of deploying the cart in the manner you have done.

[quote name='tbirnseth' timestamp='1335908461' post='135661']

Then you need to work with your host or the developer who is making changes to ensure they fully understand the impact of deploying the cart in the manner you have done.

[/quote]



Are you saying then, that his 'reverse proxy setup' as he described it is most likely the cause of our problems? He is not the developer of the cs-cart (obviously), but the guy who sets up and manages our server to keep things safe and secure. I really don't understand it all, I just know it's not working and I am now 2+ weeks without a working website.



I do not really know what to tell him to get it fixed, he suggested that it might be a bug in the code somewhere, but I have not seen anyone else that appears to have my issue.



Thank you for your assistance!

No, I'm not saying anything like that. I'm saying that you have an unusual configuration (from the norm) and that you should work closely with the people who are managing that environment.



If you have the proper template selected for the payment methods you are using, then there is either a hook by someone/something that is setting the 'cm-required' class on an input box or you are using a template that requires it.



Unfortunately, you can't really troubleshoot here in the forums. We can just look at symptoms (as observed) and tell you our opinions and exprerience.



My best is you have something setup incorrectly. If you have 3rd party addons or mods that you've installed, disable the addons and comment out the mods until the problem goes away. Then contact the developer. I've not heard of this with any standard cart before.

I understand much better, thank you for your help! We have no addons/mods at all at the moment other than what comes with CS-Cart.



I just upgraded the cart to the latest version (actually upgraded from a 3 year old version to this one). Was testing to make sure all worked before I added any addons and found this problem.



Will go back and recheck everything in configuration, it has to be something simple somewhere! I will also ask my web guy to look into the 'Hook thing' as well.



Will post what I find… when I find it.



Thanks

I was getting the same errors after switching to PHP 5.3.13 with fcgid and APC enabled.

I know this a very late reply but here is some information that I hope may help some others. If you're getting this error on AJAX requests it's due to a bug in some version of PHP.

Please see [url=“PHP :: Bug #58739 :: Fatal Error: Class xxx not found”]PHP :: Bug #58739 :: Fatal Error: Class xxx not found

This bug is easily overcome by calling

session_write_close();

in your application.

CS Cart does do this but in AJAX calls (according to ./core/class.ajax.php) it happens in the destructor.

I haven't stepped through all the code but it seems that there are cases where the Ajax class doesn't get a chance to get destroyed properly (perhaps an exit(); call?).

I was able to fix this problem by adding this code:

register_shutdown_function(“session_write_close”);

to the __construct() function in the Ajax class in ./core/class.ajax.php

This way if the destructor never get's called session_write_close(); will still be called.

By the way we're running CS Cart [color=#000000][font=Tahoma, Arial, Verdana,]2.2.4 so I don't know if this has been fixed in 3.x[/font][/color]