mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for GoCardless
This commit is contained in:
parent
ce1f57b55f
commit
80b0d19951
@ -27,9 +27,8 @@ class CreatePaymentMethodRequest extends FormRequest
|
||||
$available_methods[] = $method['gateway_type_id'];
|
||||
});
|
||||
|
||||
if (in_array($this->query('method'), $available_methods)) {
|
||||
return true;
|
||||
}
|
||||
if (in_array($this->query('method'), $available_methods))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ class Client extends BaseModel implements HasLocalePreference
|
||||
|
||||
}
|
||||
|
||||
if($this->currency()->code == 'EUR' && in_array(GatewayType::BANK_TRANSFER, array_column($pms, 'gateway_type_id'))){
|
||||
if($this->currency()->code == 'EUR' && (in_array(GatewayType::BANK_TRANSFER, array_column($pms, 'gateway_type_id')) || in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) ){
|
||||
|
||||
foreach($pms as $pm){
|
||||
|
||||
@ -501,18 +501,6 @@ 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;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if ($this->country && $this->country->iso_3166_3 == 'GBR' && in_array(GatewayType::DIRECT_DEBIT, array_column($pms, 'gateway_type_id'))) {
|
||||
foreach ($pms as $pm) {
|
||||
if ($pm['gateway_type_id'] == GatewayType::DIRECT_DEBIT) {
|
||||
|
949
composer.lock
generated
949
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|
Loading…
Reference in New Issue
Block a user