1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 14:42:42 +01:00
invoiceninja/app/models/AccountGateway.php

23 lines
518 B
PHP
Raw Normal View History

2013-11-26 13:45:07 +01:00
<?php
2014-01-02 09:27:48 +01:00
class AccountGateway extends EntityModel
2013-11-26 13:45:07 +01:00
{
public function gateway()
{
return $this->belongsTo('Gateway');
}
public function getCreditcardTypes()
{
$flags = unserialize(CREDIT_CARDS);
$arrayOfImages = [];
foreach ($flags as $card => $name)
{
if (($this->accepted_credit_cards & $card) == $card)
$arrayOfImages[] = ['source' => asset($name['card']), 'alt' => $name['text']];
}
return $arrayOfImages;
}
2013-11-26 13:45:07 +01:00
}