mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 09:27:33 -04:00 
			
		
		
		
	Merge pull request #4779 from beganovich/v5-2701-stripe-countries
(v5) Define countries availability for Stripe
This commit is contained in:
		
						commit
						0db9f41a70
					
				| @ -95,17 +95,37 @@ class StripePaymentDriver extends BaseDriver | |||||||
|     { |     { | ||||||
|         $types = [ |         $types = [ | ||||||
|             GatewayType::CREDIT_CARD, |             GatewayType::CREDIT_CARD, | ||||||
|             GatewayType::BANK_TRANSFER, |  | ||||||
|             GatewayType::CRYPTO, |             GatewayType::CRYPTO, | ||||||
|             GatewayType::ALIPAY, |  | ||||||
| //            GatewayType::SEPA, // TODO: Missing implementation
 | //            GatewayType::SEPA, // TODO: Missing implementation
 | ||||||
| //            GatewayType::APPLE_PAY, // TODO:: Missing implementation
 | //            GatewayType::APPLE_PAY, // TODO:: Missing implementation
 | ||||||
|         ]; |         ]; | ||||||
| 
 | 
 | ||||||
|         if ($this->company_gateway->getSofortEnabled() && $this->invitation && $this->client() && isset($this->client()->country) && in_array($this->client()->country, ['AUT', 'BEL', 'DEU', 'ITA', 'NLD', 'ESP'])) { |         // $this->invitation = false
 | ||||||
|  |         // $this->client doesn't exist
 | ||||||
|  |         // $this->client->country is relationship?
 | ||||||
|  |         // Missing Slovenia for Alipay
 | ||||||
|  | 
 | ||||||
|  |         if ($this->company_gateway->getSofortEnabled() | ||||||
|  |             && $this->client | ||||||
|  |             && isset($this->client->country) | ||||||
|  |             && in_array($this->client->country->iso_3166_3, ['AUT', 'BEL', 'DEU', 'ITA', 'NLD', 'ESP'])) { | ||||||
|             $types[] = GatewayType::SOFORT; |             $types[] = GatewayType::SOFORT; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         if ($this->company_gateway->getAchEnabled() | ||||||
|  |             && $this->client | ||||||
|  |             && isset($this->client->country) | ||||||
|  |             && in_array($this->client->country->iso_3166_3, ['USA'])) { | ||||||
|  |             $types[] = GatewayType::BANK_TRANSFER; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         if ($this->company_gateway->getAchEnabled() | ||||||
|  |             && $this->client | ||||||
|  |             && isset($this->client->country) | ||||||
|  |             && in_array($this->client->country->iso_3166_3, ['AUS', 'DNK', 'DEU', 'ITA', 'LUX', 'NOR', 'SVN', 'GBR', 'AUT', 'EST', 'GRC', 'JPN', 'MYS', 'PRT', 'ESP', 'USA', 'BEL', 'FIN', 'HKG', 'LVA', 'NLD', 'SGP', 'SWE', 'CAN', 'FRA', 'IRL', 'LTU', 'NZL', 'SVK', 'CHE'])) { | ||||||
|  |             $types[] = GatewayType::ALIPAY; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         return $types; |         return $types; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user