mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 17:24:35 -04:00
Fix for custom payment driver label
This commit is contained in:
parent
5d302ad450
commit
56bcaf0785
@ -119,7 +119,7 @@ class InvoiceController extends Controller
|
|||||||
'hashed_ids' => $invoices->pluck('hashed_id'),
|
'hashed_ids' => $invoices->pluck('hashed_id'),
|
||||||
'total' => $total,
|
'total' => $total,
|
||||||
];
|
];
|
||||||
|
nlog($data);
|
||||||
return $this->render('invoices.payment', $data);
|
return $this->render('invoices.payment', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,14 +509,13 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
$payment_methods_intersect->push([$gateway->id => $type]);
|
$payment_methods_intersect->push([$gateway->id => $type]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$payment_methods_intersect->push([$gateway->id => $type]);
|
$payment_methods_intersect->push([$gateway->id => NULL]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle custom gateways as they are not unique'd()---------------------------------------------------------
|
//handle custom gateways as they are not unique'd()---------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$payment_urls = [];
|
$payment_urls = [];
|
||||||
|
|
||||||
foreach ($payment_methods_intersect as $key => $child_array) {
|
foreach ($payment_methods_intersect as $key => $child_array) {
|
||||||
@ -525,6 +524,16 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
|
|
||||||
$fee_label = $gateway->calcGatewayFeeLabel($amount, $this);
|
$fee_label = $gateway->calcGatewayFeeLabel($amount, $this);
|
||||||
|
|
||||||
|
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[] = [
|
$payment_urls[] = [
|
||||||
'label' => $gateway->getTypeAlias($gateway_type_id) . $fee_label,
|
'label' => $gateway->getTypeAlias($gateway_type_id) . $fee_label,
|
||||||
'company_gateway_id' => $gateway_id,
|
'company_gateway_id' => $gateway_id,
|
||||||
@ -532,6 +541,7 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (($this->getSetting('use_credits_payment') == 'option' || $this->getSetting('use_credits_payment') == 'always') && $this->service()->getCreditBalance() > 0) {
|
if (($this->getSetting('use_credits_payment') == 'option' || $this->getSetting('use_credits_payment') == 'always') && $this->service()->getCreditBalance() > 0) {
|
||||||
$payment_urls[] = [
|
$payment_urls[] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user