Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I can still checkout without any payment method


netguru

Recommended Posts

I got a question here. If I disable all the payments, It seems that I still can check out withuot payment method. For CVS 2.2, in checkout_confirmation.php, I check out this part of code:

 

  if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

 }

 

Under no payment method condition, $payment_modules will return as

 

object(payment)(2) { ["modules"]=> NULL ["selected_module"]=> NULL }

 

As such, the following condition

if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) )

will return false, and it will allow you to checkout without any payment method.

 

Is that kind of design or my mistake? Thank you!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...