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
b8514436a9
commit
104264607b
@ -71,6 +71,11 @@ class PaymentMethod extends EntityModel
|
||||
return static::lookupBankData($this->routing_number);
|
||||
}
|
||||
|
||||
public function getLast4Attribute($value)
|
||||
{
|
||||
return $value ? str_pad($value, 4, '0', STR_PAD_LEFT) : null;
|
||||
}
|
||||
|
||||
public function scopeScope($query, $publicId = false, $accountId = false, $accountGatewayTokenId = false)
|
||||
{
|
||||
$query = parent::scopeScope($query, $publicId, $accountId);
|
||||
|
Loading…
Reference in New Issue
Block a user