You are here

function commerce_authnet_acceptjs_cardonfile_create_validate in Commerce Authorize.Net 7

Validation callback for AcceptJS card on file create.

1 string reference to 'commerce_authnet_acceptjs_cardonfile_create_validate'
commerce_authnet_form_commerce_cardonfile_card_form_alter in ./commerce_authnet.module
Implements hook_form_FORM_ID_alter().

File

./commerce_authnet.module, line 890
Implements Authorize.Net payment services for use in Drupal Commerce.

Code

function commerce_authnet_acceptjs_cardonfile_create_validate($form, &$form_state) {
  if (empty($form_state['values']['data_descriptor']) || empty($form_state['values']['data_value'])) {
    form_set_error('errors', t('There was an error.'));
  }
}