You are here

public function UnsetLineItem::execute in Payment 8.2

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/UnsetLineItem.php, line 51

Class

UnsetLineItem
Sets a status on a payment.

Namespace

Drupal\payment\Plugin\Action

Code

public function execute(PaymentInterface $payment = NULL) {
  if ($payment) {
    $payment
      ->unsetLineItem($this->configuration['line_item_name']);
  }
}