mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Pad last 4 card digits to a string of length 4, since we're storing it as an int
This commit is contained in:
parent
0ca073291e
commit
b8514436a9
@ -174,6 +174,11 @@ class Payment extends EntityModel
|
||||
}
|
||||
return PaymentMethod::lookupBankData($this->routing_number);
|
||||
}
|
||||
|
||||
public function getLast4Attribute($value)
|
||||
{
|
||||
return $value ? str_pad($value, 4, '0', STR_PAD_LEFT) : null;
|
||||
}
|
||||
}
|
||||
|
||||
Payment::creating(function ($payment) {
|
||||
|
@ -67,9 +67,9 @@
|
||||
@elseif($paymentMethod->status == PAYMENT_METHOD_STATUS_VERIFICATION_FAILED)
|
||||
({{trans('texts.verification_failed')}})
|
||||
@endif
|
||||
@elseif($paymentMethod->type_id == PAYMENT_TYPE_ID_PAYPAL)
|
||||
@elseif($paymentMethod->payment_type_id == PAYMENT_TYPE_ID_PAYPAL)
|
||||
{{ $paymentMethod->email }}
|
||||
@else
|
||||
@elseif($paymentMethod->expiration)
|
||||
{!! trans('texts.card_expiration', array('expires'=>Utils::fromSqlDate($paymentMethod->expiration, false)->format('m/y'))) !!}
|
||||
@endif
|
||||
@if($paymentMethod->id == $paymentMethod->account_gateway_token->default_payment_method_id)
|
||||
|
Loading…
Reference in New Issue
Block a user