mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 08:14:35 -04:00
Allow GatewayType\SEPA to show on methods page
This commit is contained in:
parent
33e2c5d054
commit
0d20e75636
@ -152,7 +152,7 @@ class PaymentMethodController extends Controller
|
|||||||
return $gateway = auth()->user()->client->getCreditCardGateway();
|
return $gateway = auth()->user()->client->getCreditCardGateway();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request()->query('method') == GatewayType::BANK_TRANSFER) {
|
if (in_array(request()->query('method'), [GatewayType::BANK_TRANSFER, GatewayType::SEPA])) {
|
||||||
return $gateway = auth()->user()->client->getBankTransferGateway();
|
return $gateway = auth()->user()->client->getBankTransferGateway();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,6 +518,18 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->currency()->code == 'EUR' && in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) {
|
||||||
|
foreach ($pms as $pm) {
|
||||||
|
if ($pm['gateway_type_id'] == GatewayType::SEPA) {
|
||||||
|
$cg = CompanyGateway::find($pm['company_gateway_id']);
|
||||||
|
|
||||||
|
if ($cg && $cg->fees_and_limits->{GatewayType::SEPA}->is_enabled) {
|
||||||
|
return $cg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user