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

wire up custom gateway

This commit is contained in:
David Bomba 2020-12-10 21:20:12 +11:00
parent 1be59fe589
commit bb1ca556c4
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@
namespace App\Models;
use App\Models\GatewayType;
use App\PaymentDrivers\BasePaymentDriver;
use App\Utils\Number;
use Illuminate\Database\Eloquent\SoftDeletes;
@ -235,6 +236,9 @@ class CompanyGateway extends BaseModel
return false;
}
if($gateway_type_id == GatewayType::CUSTOM)
$gateway_type_id = GatewayType::CREDIT_CARD;
return $this->fees_and_limits->{$gateway_type_id};
}

View File

@ -95,7 +95,7 @@ class PaymentLibrariesSeeder extends Seeder
Gateway::query()->update(['visible' => 0]);
Gateway::whereIn('id', [1,15,20,39])->update(['visible' => 1]);
Gateway::whereIn('id', [1,15,20,39,55])->update(['visible' => 1]);
Gateway::all()->each(function ($gateway) {
$gateway->site_url = $gateway->getHelp();