mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 04:07:32 -05:00 
			
		
		
		
	Add DirectDebit to GoCardlessPaymentDriver
This commit is contained in:
		
							parent
							
								
									e06aefdd22
								
							
						
					
					
						commit
						32f81ab253
					
				@ -38,6 +38,7 @@ class GoCardlessPaymentDriver extends BaseDriver
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public static $methods = [
 | 
					    public static $methods = [
 | 
				
			||||||
        GatewayType::BANK_TRANSFER => \App\PaymentDrivers\GoCardless\ACH::class,
 | 
					        GatewayType::BANK_TRANSFER => \App\PaymentDrivers\GoCardless\ACH::class,
 | 
				
			||||||
 | 
					        GatewayType::DIRECT_DEBIT => \App\PaymentDrivers\GoCardless\DirectDebit::class,
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const SYSTEM_LOG_TYPE = SystemLog::TYPE_GOCARDLESS;
 | 
					    const SYSTEM_LOG_TYPE = SystemLog::TYPE_GOCARDLESS;
 | 
				
			||||||
@ -63,6 +64,14 @@ class GoCardlessPaymentDriver extends BaseDriver
 | 
				
			|||||||
            $types[] = GatewayType::BANK_TRANSFER;
 | 
					            $types[] = GatewayType::BANK_TRANSFER;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (
 | 
				
			||||||
 | 
					            $this->client
 | 
				
			||||||
 | 
					            && isset($this->client->country)
 | 
				
			||||||
 | 
					            && in_array($this->client->country->iso_3166_3, ['GBR'])
 | 
				
			||||||
 | 
					        ) {
 | 
				
			||||||
 | 
					            $types[] = GatewayType::DIRECT_DEBIT;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $types;
 | 
					        return $types;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user