mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 16:57:33 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			518 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			518 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| <?php
 | |
| 
 | |
| class AccountGateway extends EntityModel
 | |
| {
 | |
| 	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;
 | |
|     }
 | |
| } |