From beb503758e6d11fe759ca4fe1a0cec1a649120a2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 10 Oct 2021 08:39:50 +1100 Subject: [PATCH] Minor fixes for iDeal payments with Stripe --- app/PaymentDrivers/StripePaymentDriver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index d6416d0d62..0ffcf502d5 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -150,12 +150,16 @@ class StripePaymentDriver extends BaseDriver } if ($this->client + && $this->client->currency() + && ($this->client->currency()->code == 'EUR') && isset($this->client->country) && in_array($this->client->country->iso_3166_3, ['AUS', 'DNK', 'DEU', 'ITA', 'LUX', 'NOR', 'SVN', 'GBR', 'EST', 'GRC', 'JPN', 'PRT', 'ESP', 'USA', 'BEL', 'FIN'])) { // TODO: More has to be added https://stripe.com/docs/payments/sepa-debit $types[] = GatewayType::SEPA; } - if ($this -> client + if ($this->client + && $this->client->currency() + && ($this->client->currency()->code == 'EUR') && isset($this->client->country) && in_array($this->client->country->iso_3166_3, ["NLD"])) $types[] = GatewayType::IDEAL;