mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:54:31 -04:00
Add DirectDebit to GoCardlessPaymentDriver
This commit is contained in:
parent
e06aefdd22
commit
32f81ab253
@ -38,6 +38,7 @@ class GoCardlessPaymentDriver extends BaseDriver
|
||||
|
||||
public static $methods = [
|
||||
GatewayType::BANK_TRANSFER => \App\PaymentDrivers\GoCardless\ACH::class,
|
||||
GatewayType::DIRECT_DEBIT => \App\PaymentDrivers\GoCardless\DirectDebit::class,
|
||||
];
|
||||
|
||||
const SYSTEM_LOG_TYPE = SystemLog::TYPE_GOCARDLESS;
|
||||
@ -63,6 +64,14 @@ class GoCardlessPaymentDriver extends BaseDriver
|
||||
$types[] = GatewayType::BANK_TRANSFER;
|
||||
}
|
||||
|
||||
if (
|
||||
$this->client
|
||||
&& isset($this->client->country)
|
||||
&& in_array($this->client->country->iso_3166_3, ['GBR'])
|
||||
) {
|
||||
$types[] = GatewayType::DIRECT_DEBIT;
|
||||
}
|
||||
|
||||
return $types;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user