You are here

function commerce_avatax_commit_transaction in Drupal Commerce Connector for AvaTax 7.5

Same name and namespace in other branches
  1. 7.4 commerce_avatax.rules.inc \commerce_avatax_commit_transaction()

COMMIT an existing transaction for a given $order.

File

./commerce_avatax.module, line 742
AvaTax service integration from Avalara, Inc.

Code

function commerce_avatax_commit_transaction($order) {
  if (isset($order->data['commerce_avatax']['transaction_code']) && ($avatax = commerce_avatax_object())) {
    if (!empty($order->data['commerce_avatax']['company_code'])) {
      $avatax
        ->transactionsCommit($order->data['commerce_avatax']['company_code'], $order->data['commerce_avatax']['transaction_code']);
    }
  }
}