Merge pull request #19364 from ptibogxiv/patch-452
ADD Klarna provider with Stripe
This commit is contained in:
commit
184b76d0ab
@ -390,6 +390,20 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Activate Klarna
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("STRIPE_KLARNA").'</td><td>';
|
||||
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 ' <span class="opacitymedium">'.$langs->trans("ExampleOnlyForKlarnaCustomers").'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Activate Bancontact
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
|
||||
print '<tr class="oddeven"><td>';
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user