public function PaymentMethod::isExpired in Commerce Core 8.2
Gets whether the payment method has expired.
Return value
bool TRUE if the payment method has expired, FALSE otherwise.
Overrides PaymentMethodInterface::isExpired
File
- modules/
payment/ src/ Entity/ PaymentMethod.php, line 176
Class
- PaymentMethod
- Defines the payment method entity class.
Namespace
Drupal\commerce_payment\EntityCode
public function isExpired() {
$expires = $this
->getExpiresTime();
return $expires > 0 && $expires <= \Drupal::time()
->getRequestTime();
}