Add support for SEPA

This commit is contained in:
Lars Kusch 2021-10-04 17:33:35 +02:00 committed by GitHub
parent 8d25b45eaa
commit 539e584cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ use App\PaymentDrivers\Stripe\Connect\Verify;
use App\PaymentDrivers\Stripe\CreditCard;
use App\PaymentDrivers\Stripe\ImportCustomers;
use App\PaymentDrivers\Stripe\SOFORT;
use APP\PaymentDrivers\Stripe\SEPA;
use App\PaymentDrivers\Stripe\UpdatePaymentMethods;
use App\PaymentDrivers\Stripe\Utilities;
use App\Utils\Traits\MakesHash;
@ -75,7 +76,7 @@ class StripePaymentDriver extends BaseDriver
GatewayType::ALIPAY => Alipay::class,
GatewayType::SOFORT => SOFORT::class,
GatewayType::APPLE_PAY => ApplePay::class,
GatewayType::SEPA => 1, // TODO
GatewayType::SEPA => 1, SEPA::class,
];
const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE;
@ -146,6 +147,12 @@ class StripePaymentDriver extends BaseDriver
$types[] = GatewayType::ALIPAY;
}
if ($this->client
&& isset($this->client->country)
&& in_array($this->client->country->iso_3166_3, ['DEU', 'USA'])) {
$types[] = GateWayType::SEPA;
}
return $types;
}