tanda5 Posted June 12, 2004 Share Posted June 12, 2004 Okay after the customer clicks confirm order they get redirected to the login page. But bluepay shows there was an order placed. After logging back in the item/items are still listed in there basket and there is no order in customer order reports section of the admin field. My redirect after the confirmation button is clicked goes to success for approval and error fro denial. If i use the reg CC module it works great. What am i missing here. Also i got around the BMC code that needs to be hidden by Bluepay i made a encrypt code and included in my checkout_confirmation.php page <? function _fwk_filter_encrypt($content) { $table = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@"; $xor = 165; // Prepare encoding table $table = array_keys(count_chars($table, 1)); $i_min = min($table); $i_max = max($table); for ($c = count($table); $c > 0; $r = mt_rand(0, $c--)) array_splice($table, $r, $c - $r, array_reverse(array_slice($table, $r, $c - $r))); // Encode sequence $len = strlen($content); $word = $shift = 0; for ($i = 0; $i < $len; $i++) { $ch = $xor ^ ord($content[$i]); $word |= ($ch << $shift); $shift = ($shift + 2) % 6; $enc .= chr($table[$word & 0x3F]); $word >>= 6; if (!$shift) { $enc .= chr($table[$word]); $word >>= 6; } } if ($shift) $enc .= chr($table[$word]); // Decode sequence $tbl = array_fill($i_min, $i_max - $i_min + 1, 0); while (list($k,$v) = each($table)) $tbl[$v] = $k; $tbl = implode(",", $tbl); $fi = ",p=0,s=0,w=0,t=Array({$tbl})"; $f = "w|=(t[x.charCodeAt(p++)-{$i_min}])<<s;"; $f .= "if(s){r+=String.fromCharCode({$xor}^w&255);w>>=8;s-=2}else{s=6}"; // Generate page $r = "<script language=JavaScript>"; $r.= "function decrypt_p(x){"; $r.= "var l=x.length,b=1024,i,j,r{$fi};"; $r.= "for(j=Math.ceil(l/b);j>0;j--){r='';for(i=Math.min(l,b);i>0;i--,l--){{$f}}document.write(r)}"; $r.= "}decrypt_p(\"{$enc}\")"; $r.= "</script>"; return $r; } ob_start("_fwk_filter_encrypt"); ?> Hope this helps some out there. The page is all jibberish but it still send the info to bluepay like a dream. Troy Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted May 18, 2006 Share Posted May 18, 2006 voodoosmile posted a solution to the problem where the customer gets redirected to the login page, and where osCommerce doesn't register the order. To see his solution go to http://www.oscommerce.com/forums/index.php?sho...3294&hl=bluepay He said: had the same problem that everyone else had. I am using a shared ssl and bluepay kept sending me back to the login without processing the order but it would bill the credit card. Here is my fix in the file /includes/modules/odcbp.php I changed line 365 from tep_draw_hidden_field('APPROVED_URL', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false)) . to tep_draw_hidden_field('APPROVED_URL', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true, false)) . the SSL declaration was reading false so it would not send the info to the right page. Hope this Helps Okay after the customer clicks confirm order they get redirected to the login page.But bluepay shows there was an order placed. After logging back in the item/items are still listed in there basket and there is no order in customer order reports section of the admin field. My redirect after the confirmation button is clicked goes to success for approval and error fro denial. If i use the reg CC module it works great. What am i missing here. Also i got around the BMC code that needs to be hidden by Bluepay i made a encrypt code and included in my checkout_confirmation.php page <? function _fwk_filter_encrypt($content) { $table = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@"; $xor = 165; // Prepare encoding table $table = array_keys(count_chars($table, 1)); $i_min = min($table); $i_max = max($table); for ($c = count($table); $c > 0; $r = mt_rand(0, $c--)) array_splice($table, $r, $c - $r, array_reverse(array_slice($table, $r, $c - $r))); // Encode sequence $len = strlen($content); $word = $shift = 0; for ($i = 0; $i < $len; $i++) { $ch = $xor ^ ord($content[$i]); $word |= ($ch << $shift); $shift = ($shift + 2) % 6; $enc .= chr($table[$word & 0x3F]); $word >>= 6; if (!$shift) { $enc .= chr($table[$word]); $word >>= 6; } } if ($shift) $enc .= chr($table[$word]); // Decode sequence $tbl = array_fill($i_min, $i_max - $i_min + 1, 0); while (list($k,$v) = each($table)) $tbl[$v] = $k; $tbl = implode(",", $tbl); $fi = ",p=0,s=0,w=0,t=Array({$tbl})"; $f = "w|=(t[x.charCodeAt(p++)-{$i_min}])<<s;"; $f .= "if(s){r+=String.fromCharCode({$xor}^w&255);w>>=8;s-=2}else{s=6}"; // Generate page $r = "<script language=JavaScript>"; $r.= "function decrypt_p(x){"; $r.= "var l=x.length,b=1024,i,j,r{$fi};"; $r.= "for(j=Math.ceil(l/b);j>0;j--){r='';for(i=Math.min(l,b);i>0;i--,l--){{$f}}document.write(r)}"; $r.= "}decrypt_p(\"{$enc}\")"; $r.= "</script>"; return $r; } ob_start("_fwk_filter_encrypt"); ?> Hope this helps some out there. The page is all jibberish but it still send the info to bluepay like a dream. Troy 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.