diff --git a/app/Http/Controllers/ClientPortal/InvoiceController.php b/app/Http/Controllers/ClientPortal/InvoiceController.php index 22d27fa675..3eb8a885a8 100644 --- a/app/Http/Controllers/ClientPortal/InvoiceController.php +++ b/app/Http/Controllers/ClientPortal/InvoiceController.php @@ -119,7 +119,7 @@ class InvoiceController extends Controller 'hashed_ids' => $invoices->pluck('hashed_id'), 'total' => $total, ]; - +nlog($data); return $this->render('invoices.payment', $data); } diff --git a/app/Models/Client.php b/app/Models/Client.php index e09503cb75..9c39ba2d1a 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -509,14 +509,13 @@ class Client extends BaseModel implements HasLocalePreference $payment_methods_intersect->push([$gateway->id => $type]); } } else { - $payment_methods_intersect->push([$gateway->id => $type]); + $payment_methods_intersect->push([$gateway->id => NULL]); } } } //handle custom gateways as they are not unique'd()--------------------------------------------------------- - $payment_urls = []; foreach ($payment_methods_intersect as $key => $child_array) { @@ -525,11 +524,22 @@ class Client extends BaseModel implements HasLocalePreference $fee_label = $gateway->calcGatewayFeeLabel($amount, $this); - $payment_urls[] = [ - 'label' => $gateway->getTypeAlias($gateway_type_id) . $fee_label, - 'company_gateway_id' => $gateway_id, - 'gateway_type_id' => $gateway_type_id, - ]; + if(!$gateway_type_id){ + + $payment_urls[] = [ + 'label' => $gateway->getConfigField('name') . $fee_label, + 'company_gateway_id' => $gateway_id, + 'gateway_type_id' => GatewayType::CREDIT_CARD, + ]; + } + else + { + $payment_urls[] = [ + 'label' => $gateway->getTypeAlias($gateway_type_id) . $fee_label, + 'company_gateway_id' => $gateway_id, + 'gateway_type_id' => $gateway_type_id, + ]; + } } }