You are here

function hook_commerce_avatax_order_request_alter in Drupal Commerce Connector for AvaTax 8

Alter the request body right before its sent to AvaTax.

Parameters

array $request_body: The request body array.

\Drupal\commerce_order\Entity\OrderInterface $order: The order.

See also

\Drupal\commerce_avatax\Plugin\Commerce\TaxType\Avatax

1 invocation of hook_commerce_avatax_order_request_alter()
AvataxLib::prepareTransactionsCreate in src/AvataxLib.php
Prepares the transaction request body. (This method should not be public but that makes the tests easier).

File

./commerce_avatax.api.php, line 25
Hooks provided by the Commerce AvaTax module.

Code

function hook_commerce_avatax_order_request_alter(array &$request_body, OrderInterface $order) {
  $request_body['type'] = 'SalesInvoice';
}