1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Conditionally show ACH for US customers

This commit is contained in:
Benjamin Beganović 2021-09-29 14:17:30 +02:00
parent ba0210fff6
commit 33f0b6b7c6

View File

@ -50,9 +50,17 @@ class GoCardlessPaymentDriver extends BaseDriver
public function gatewayTypes(): array
{
return [
GatewayType::BANK_TRANSFER,
];
$types = [];
if (
$this->client
&& isset($this->client->country)
&& in_array($this->client->country->iso_3166_3, ['USA'])
) {
$types[] = GatewayType::BANK_TRANSFER;
}
return $types;
}
public function authorizeView(array $data)