mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Add support for Klarna
This commit is contained in:
parent
d3d4972242
commit
9a08eb0940
@ -37,6 +37,7 @@ use App\PaymentDrivers\Stripe\CreditCard;
|
|||||||
use App\PaymentDrivers\Stripe\EPS;
|
use App\PaymentDrivers\Stripe\EPS;
|
||||||
use App\PaymentDrivers\Stripe\FPX;
|
use App\PaymentDrivers\Stripe\FPX;
|
||||||
use App\PaymentDrivers\Stripe\GIROPAY;
|
use App\PaymentDrivers\Stripe\GIROPAY;
|
||||||
|
use App\PaymentDrivers\Stripe\Klarna;
|
||||||
use App\PaymentDrivers\Stripe\iDeal;
|
use App\PaymentDrivers\Stripe\iDeal;
|
||||||
use App\PaymentDrivers\Stripe\ImportCustomers;
|
use App\PaymentDrivers\Stripe\ImportCustomers;
|
||||||
use App\PaymentDrivers\Stripe\Jobs\PaymentIntentFailureWebhook;
|
use App\PaymentDrivers\Stripe\Jobs\PaymentIntentFailureWebhook;
|
||||||
@ -97,6 +98,7 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
GatewayType::BECS => BECS::class,
|
GatewayType::BECS => BECS::class,
|
||||||
GatewayType::ACSS => ACSS::class,
|
GatewayType::ACSS => ACSS::class,
|
||||||
GatewayType::FPX => FPX::class,
|
GatewayType::FPX => FPX::class,
|
||||||
|
GatewayType::KLARNA => KLARNA::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE;
|
const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE;
|
||||||
@ -233,6 +235,13 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
&& in_array($this->client->country->iso_3166_3, ['CAN', 'USA'])) {
|
&& in_array($this->client->country->iso_3166_3, ['CAN', 'USA'])) {
|
||||||
$types[] = GatewayType::ACSS;
|
$types[] = GatewayType::ACSS;
|
||||||
}
|
}
|
||||||
|
if ($this->client
|
||||||
|
&& $this->client->currency()
|
||||||
|
&& in_array($this->client->currency()->code, ['EUR', 'USD', 'GBP', 'DKK', 'SEK', 'NOK'])
|
||||||
|
&& isset($this->client->country)
|
||||||
|
&& in_array($this->client->country->iso_3166_3, ['DE', 'AT', 'BE'])) {
|
||||||
|
$types[] = GatewayType::KLARNA;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$this->client
|
$this->client
|
||||||
@ -271,6 +280,9 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
case GatewayType::GIROPAY:
|
case GatewayType::GIROPAY:
|
||||||
return 'gateways.stripe.giropay';
|
return 'gateways.stripe.giropay';
|
||||||
break;
|
break;
|
||||||
|
case GatewayType::KLARNA:
|
||||||
|
return 'gateways.stripe.klarna';
|
||||||
|
break;
|
||||||
case GatewayType::IDEAL:
|
case GatewayType::IDEAL:
|
||||||
return 'gateways.stripe.ideal';
|
return 'gateways.stripe.ideal';
|
||||||
case GatewayType::EPS:
|
case GatewayType::EPS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user