public function Payment::execute in Payment 8.2
Executes the payment.
Return value
\Drupal\payment\OperationResultInterface
Overrides PaymentInterface::execute
File
- src/Entity/ Payment.php, line 354 
Class
- Payment
- Defines a payment entity.
Namespace
Drupal\payment\EntityCode
public function execute() {
  if ($this
    ->getPaymentMethod()) {
    return $this
      ->getPaymentMethod()
      ->executePayment();
  }
}