You are here

public function Payment::isExpired in Commerce Core 8.2

Gets whether the payment has expired.

Return value

bool TRUE if the payment has expired, FALSE otherwise.

Overrides PaymentInterface::isExpired

File

modules/payment/src/Entity/Payment.php, line 275

Class

Payment
Defines the payment entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function isExpired() {
  $expires = $this
    ->getExpiresTime();
  return $expires > 0 && $expires <= \Drupal::time()
    ->getRequestTime();
}