From 697300750a5aa72908f607fe860638153b1dfc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 1 Nov 2021 17:27:45 +0100 Subject: [PATCH] Supported countries in StripePaymentDriver --- app/PaymentDrivers/StripePaymentDriver.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 648f6fd665..dcdda73b98 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -141,7 +141,6 @@ class StripePaymentDriver extends BaseDriver $types = [ // GatewayType::CRYPTO, GatewayType::CREDIT_CARD, - GatewayType::APPLE_PAY, ]; if ($this->client @@ -220,6 +219,14 @@ class StripePaymentDriver extends BaseDriver && in_array($this->client->country->iso_3166_3, ["CAN", "USA"])) $types[] = GatewayType::ACSS; + if ( + $this->client + && isset($this->client->country) + && in_array($this->client->country->iso_3166_2, ['AE', 'AT', 'AU', 'BE', 'BG', 'BR', 'CA', 'CH', 'CI', 'CR', 'CY', 'CZ', 'DE', 'DK', 'DO', 'EE', 'ES', 'FI', 'FR', 'GB', 'GI', 'GR', 'GT', 'HK', 'HU', 'ID', 'IE', 'IN', 'IT', 'JP', 'LI', 'LT', 'LU', 'LV', 'MT', 'MX', 'MY', 'NL', 'NO', 'NZ', 'PE', 'PH', 'PL', 'PT', 'RO', 'SE', 'SG', 'SI', 'SK', 'SN', 'TH', 'TT', 'US', 'UY']) + ) { + $types[] = GatewayType::SOFORT; + } + return $types; }