You are here

function commerce_payleap_direct_submit_form_validate in Commerce Payleap 7

Payment method callback: checkout form validation - Direct.

File

./commerce_payleap.module, line 232
Implements PayLeap payment services for use in Drupal Commerce.

Code

function commerce_payleap_direct_submit_form_validate($payment_method, $pane_form, $pane_values, $order, $form_parents = array()) {
  module_load_include('inc', 'commerce_payment', 'includes/commerce_payment.credit_card');

  // Validate the credit card fields.
  $settings = array(
    'form_parents' => array_merge($form_parents, array(
      'credit_card',
    )),
  );
  if (!commerce_payment_credit_card_validate($pane_values['credit_card'], $settings)) {
    return FALSE;
  }
}