Skip to content
16 changes: 13 additions & 3 deletions src/Resources/PaymentTypes/SepaDirectDebit.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class SepaDirectDebit extends BasePaymentType
{
use CanDirectCharge;
use CanPayout;
use CanRecur {
setRecurring as public;
}
use CanRecur;

/** @var string $iban */
protected $iban;
Expand Down Expand Up @@ -94,6 +92,18 @@ public function setHolder(?string $holder): self
return $this;
}

/**
* Enables or disables recurring collection for this SEPA direct debit type.
*
* Set to `true` to register the type for recurring (mandate-based) collection; defaults to `false`
* for one-off collection. Applied once, at type registration.
*/
public function setRecurring(bool $active): self
{
$this->recurring = $active;
return $this;
}

/**
* Always exposes the recurring flag (default false) so the SEPA direct debit type registration
* carries the mandate intent.
Expand Down
Loading