diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 3f92130af0..86743bea49 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -14,9 +14,7 @@ namespace App\Services\Invoice; use App\DataMapper\InvoiceItem; use App\Events\Payment\PaymentWasCreated; use App\Factory\PaymentFactory; -use App\Models\Client; use App\Models\Credit; -use App\Models\GatewayType; use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentHash; @@ -83,7 +81,7 @@ class AutoBillInvoice extends AbstractService } /* $gateway fee */ - $fee = $gateway_token->gateway->calcGatewayFee($amount, GatewayType::CREDIT_CARD, $this->invoice->uses_inclusive_taxes); + $fee = $gateway_token->gateway->calcGatewayFee($amount, $gateway_token->gateway_type_id, $this->invoice->uses_inclusive_taxes); //todo determine exact fee as per PaymentController