You are here

function commerce_avatax_validate_shipping_address_ajax_callback in Drupal Commerce Connector for AvaTax 7.4

Same name and namespace in other branches
  1. 7.5 commerce_avatax.module \commerce_avatax_validate_shipping_address_ajax_callback()

Custom Ajax callback for setting up address validation popup.

1 string reference to 'commerce_avatax_validate_shipping_address_ajax_callback'
commerce_avatax_form_alter in ./commerce_avatax.module
Implements hook_form_alter().

File

./commerce_avatax.module, line 984
Calculate Sales Tax using AvaTax service from Avalara, Inc.

Code

function commerce_avatax_validate_shipping_address_ajax_callback($form, &$form_state) {
  $commands = array();
  $commands[] = array(
    'command' => 'afterAddressValidation',
    'validation_result' => isset($form_state['address_validation_result']) ? $form_state['address_validation_result'] : FALSE,
    'errors' => form_get_errors(),
  );
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}