Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment method details not being saved


bobsi18

Recommended Posts

Hi there all...

 

I'm having a bugger of a time trying to figure this one out, please give me a hand :thumbsup:

 

I have noticed that many of my test orders coming through don't have any payment details. I.e. if I look them up in admin>orders, it doesn't list the payment method, cc number, expiry (if applicable) etc. Also, when I'm placing the order, my credit card is not being validated, in that I can enter the number 4444444444444444444444444444 with expiry january 2006 and it's all ok, I don't get an error.

 

I have a bunch of contributions installed, including CCGV (gift vouchers). I've tested this for the last two hours and have found that this only happens if the gift voucher balance is greater than the cart balance. If the cart balance is bigger, it's fine.

 

So I've started going through all the files that were edited for CCGV. It's a long job, and I'm not convinced I'll pick up the error, so hence the post.

 

Has this happened to anyone else? I've found snippets here and there on the board indicating similar behaviour, but nothing concrete. Does anyone know which file/s the mistake is likely to be in? I though maybe includes/classes/payment.php, but I've been through that one and it seems ok.

 

Any advice would be great!!!

 

thanks,

~bobsi18~

Link to comment
Share on other sites

Wellllllll... I think I may have found the problem... I really dont understand it, but I found the code in includes/classes/order_total.php... I changed:

// #################### Begin Added CGV JONYO ######################

     $gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
     $gv_result=tep_db_fetch_array($gv_query);
     $gv_payment_amount = $gv_result['amount'];
//        if ($order->info['total'] - $total_deductions <= 0 ) {    
       if ($order->info['total'] - $gv_payment_amount <= 0 ) {
if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers');
         $credit_covers = true;
       }
else{   // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart
	if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');
}
// #################### End Added CGV JONYO ######################

I uncommented the line in the middle (and added an extra } to make it work:

// #################### Begin Added CGV JONYO ######################

     $gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
     $gv_result=tep_db_fetch_array($gv_query);
     $gv_payment_amount = $gv_result['amount'];
//##uncommented section below to make it work... why??? i don't know!!!
       if ($order->info['total'] - $total_deductions <= 0 ) {
//##uncommented section above to make it work... why??? i don't know!!!        
       if ($order->info['total'] - $gv_payment_amount <= 0 ) {
if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers');
         $credit_covers = true;
       }
       //bof
       }
       //eof
else{   // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart
	if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');
}
// #################### End Added CGV JONYO ######################

 

I really have no idea why this (appears) to be working, if someone sees it as completely incorrect and can tell me what to do, i'd love it!!!

 

thanks,

~bobsi18~

Link to comment
Share on other sites

I think I've got it... I was missing a tiny bit of code from checkout_confirmation:

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)  && [b](!$credit_covers)[/b]) && (!$customer_shopping_points_spending) || (is_object($$payment) && ($$payment->enabled == false)) ) {

 

i was missing the bit in bold... oops :blush:

~bobsi18~

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...