Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Redirect to Login Page (credit card validation)


Guest

Recommended Posts

HI,

 

I have a problem where if you enter the incorrect Credit Card information it redirects you to the loogin page.

 

The session seems to change at his point in the URL

 

Dont seem to have a probelm anywhere else and can't think of any mods that may cause this.

 

I have done page compares with the latest version and nothing stands out as different.

 

Where is the function that actually does the check and is it called on checkout confirmation.

 

Seems like such a strange problem

 

Any help appreciated

Link to comment
Share on other sites

Ok to everyone who has replied to this thread here is an update

 

If I get the file cc_validation.php and make it ignore what digits make up the card it goes through ok, so this seems to be where the problem lies. Now where is the session getting killed??

 

Thanks for all your help so far

Link to comment
Share on other sites

Firstly thanks to 14zero for helping me track down this problem..

 

/*if ( ($result == false) || ($result < 1) ) {

$payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&cc_owner=' . urlencode($HTTP_POST_VARS['cc_owner']) . '&cc_expires_month=' . $HTTP_POST_VARS['cc_expires_month'] . '&cc_expires_year=' . $HTTP_POST_VARS['cc_expires_year'];

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));

}*/

 

If I comment this baby out I dont have a problem, it doesn't kick me back to login so what is the probelm I wonder, any thoughts you guys??

Link to comment
Share on other sites

Ok, now we are getting somewhere, thanks again everyone!!

 

It seems there is a MOD that is causing this problem and it is ULTIMATE SEO's

 

If I turn this baby off, the errors go through ok.

 

This is the code for Ultimate SEOs

 

----------------------------------------------------------

 

////

// Ultimate SEO URLs v2.1

// The HTML href link wrapper function

if (SEO_ENABLED == 'true') { //run chemo's code

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $seo_urls;

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

include_once(DIR_WS_CLASSES . 'seo.class.php');

}

global $languages_id;

$seo_urls = new SEO_URL($languages_id);

}

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

} else { //run original code

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $request_type, $session_started, $SID;

 

if (!tep_not_null($page)) {

die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');

}

 

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == true) {

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

} else {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

}

} else {

die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

}

 

if (tep_not_null($parameters)) {

$link .= $page . '?' . tep_output_string($parameters);

$separator = '&';

} else {

$link .= $page;

$separator = '?';

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined

if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {

if (tep_not_null($SID)) {

$_sid = $SID;

} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {

if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {

$_sid = tep_session_name() . '=' . tep_session_id();

}

}

}

 

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {

while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

 

$link = str_replace('?', '/', $link);

$link = str_replace('&', '/', $link);

$link = str_replace('=', '/', $link);

 

$separator = '?';

}

 

if (isset($_sid)) {

$link .= $separator . $_sid;

}

 

return $link;

}

}

Link to comment
Share on other sites

WOAH Slow down,

 

We have to go through each answer at a time, I know your all eager to help but flooding this thread isn't helping.

 

SO where were we,

 

Oh yeah, The ultimate SEO function killing the session when the Credit Card validation function is called and finds an error.. let's go back to that.

 

One at a time please guys

Link to comment
Share on other sites

  • 1 month later...

I'm having the exact same problem. I'm using shared SSL on a 1and1 server. With Chemo's SEO Urls turned off, everything works fine. The user ID is passed from non SSL to SSL pages, errors are properly displayed, orders go through. When I turn SEO Urls on, any error sends me to the login page, with a new osCsid.

 

What I don't understand is that SEO Url is not supposed to be doing anything to the checkout_*.php files in the first place, so why does enabling it cause the problem?

 

I've seen 4 other people complaining of the same problem but haven't found an answer anywhere.

 

I really like Chemo's SEO contrib and would like to use it. Any ideas greatly appreciated.

Link to comment
Share on other sites

Maybe I should also say that I'm using the STS, HTC, Article Manager, and Globals Off contributions, though I don't think anything other than STS are likely to be causing the problem (I tried a credit card transactions with Globals ON, but got the same error).

 

Thanks in advance ...

Link to comment
Share on other sites

  • 1 year later...
WOAH Slow down,

 

We have to go through each answer at a time, I know your all eager to help but flooding this thread isn't helping.

 

SO where were we,

 

Oh yeah, The ultimate SEO function killing the session when the Credit Card validation function is called and finds an error.. let's go back to that.

 

One at a time please guys

 

Hello, has anybody been able to solve this issue. I have the same issue. I want to use the Ultimate SEO's but I have to turn them off until I can figure this out.

 

Thanks a ton,

 

Troy

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...