You are here

public function OrderSubscriber::onOrderCancel in Drupal Commerce Connector for AvaTax 8

Voids the AvaTax transaction on order cancellation.

Parameters

\Drupal\state_machine\Event\WorkflowTransitionEvent $event: The workflow transition event.

File

src/EventSubscriber/OrderSubscriber.php, line 78

Class

OrderSubscriber

Namespace

Drupal\commerce_avatax\EventSubscriber

Code

public function onOrderCancel(WorkflowTransitionEvent $event) {
  $this
    ->voidTransaction($event
    ->getEntity());
}