mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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);
|
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)
|
public function scopeScope($query, $publicId = false, $accountId = false, $accountGatewayTokenId = false)
|
||||||
{
|
{
|
||||||
$query = parent::scopeScope($query, $publicId, $accountId);
|
$query = parent::scopeScope($query, $publicId, $accountId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user