Support relabeling 'Credit Card'

This commit is contained in:
Hillel Coren 2017-08-16 15:33:41 +03:00
parent c5cac623a7
commit acc6a13126
2 changed files with 6 additions and 1 deletions

View File

@ -224,6 +224,7 @@ class Account extends Eloquent
public static $customLabels = [ public static $customLabels = [
'balance_due', 'balance_due',
'credit_card',
'description', 'description',
'discount', 'discount',
'due_date', 'due_date',

View File

@ -938,7 +938,11 @@ class BasePaymentDriver
$label = e($this->accountGateway->getConfigField('name')); $label = e($this->accountGateway->getConfigField('name'));
} else { } else {
$url = $this->paymentUrl($gatewayTypeAlias); $url = $this->paymentUrl($gatewayTypeAlias);
$label = trans("texts.{$gatewayTypeAlias}"); if ($custom = $this->account()->getLabel($gatewayTypeAlias)) {
$label = $custom;
} else {
$label = trans("texts.{$gatewayTypeAlias}");
}
} }
$label .= $this->invoice()->present()->gatewayFee($gatewayTypeId); $label .= $this->invoice()->present()->gatewayFee($gatewayTypeId);