public function DunningSubscriber::sendPaymentDeclinedEmail in Commerce Recurring Framework 8
Sends a payment declined email.
Parameters
\Drupal\commerce_recurring\Event\PaymentDeclinedEvent $event: The event we subscribed to.
File
- src/
EventSubscriber/ DunningSubscriber.php, line 46
Class
- DunningSubscriber
- Sends an email when the payment is declined for a recurring order.
Namespace
Drupal\commerce_recurring\EventSubscriberCode
public function sendPaymentDeclinedEmail(PaymentDeclinedEvent $event) {
if (empty($event
->getOrder()
->getEmail())) {
return;
}
$this->paymentDeclinedMail
->send($event
->getOrder(), $event
->getRetryDays(), $event
->getNumRetries(), $event
->getMaxRetries());
}