diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php
index 06f417e48df..77c8d9a03b2 100644
--- a/htdocs/stripe/admin/stripe.php
+++ b/htdocs/stripe/admin/stripe.php
@@ -390,6 +390,20 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
print '';
}
+// Activate Klarna
+if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
+ print '
| ';
+ print $langs->trans("STRIPE_KLARNA").' | ';
+ if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('STRIPE_KLARNA');
+ } else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("STRIPE_KLARNA", $arrval, $conf->global->STRIPE_KLARNA);
+ }
+ print ' '.$langs->trans("ExampleOnlyForKlarnaCustomers").'';
+ print ' |
';
+}
+
// Activate Bancontact
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
print '| ';
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index 9324d7d3a5d..a520e83f0ee 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -409,6 +409,9 @@ class Stripe extends CommonObject
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) {
$paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
}
+ if (!empty($conf->global->STRIPE_KLARNA)) {
+ $paymentmethodtypes[] = "klarna";
+ }
if (!empty($conf->global->STRIPE_BANCONTACT)) {
$paymentmethodtypes[] = "bancontact";
}
@@ -450,7 +453,9 @@ class Stripe extends CommonObject
if (!empty($conf->global->STRIPE_GIROPAY)) {
unset($dataforintent['setup_future_usage']);
}
-
+ if (!empty($conf->global->STRIPE_KLARNA)) {
+ unset($dataforintent['setup_future_usage']);
+ }
if (!is_null($payment_method)) {
$dataforintent["payment_method"] = $payment_method;
$description .= ' - '.$payment_method;
@@ -602,6 +607,9 @@ class Stripe extends CommonObject
if (!empty($conf->global->STRIPE_BANCONTACT)) {
$paymentmethodtypes[] = "bancontact";
}
+ if (!empty($conf->global->STRIPE_KLARNA)) {
+ $paymentmethodtypes[] = "klarna";
+ }
if (!empty($conf->global->STRIPE_IDEAL)) {
$paymentmethodtypes[] = "ideal";
}
|