feat(payments): Express-Adressen nur aus erlaubten Laendern (Setting express_countries, Standard DE)

This commit is contained in:
Thomas Bartelt
2026-09-13 21:49:09 +02:00
parent da54028a6e
commit 5e6fcb0c3d
3 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -420,7 +420,11 @@ class website_cashdesk {
$this->layout_object->assign('message', 'Der Express-Vorgang konnte nicht übernommen werden. Ihr Warenkorb ist noch da – bitte gehen Sie normal zur Kasse.');
return $this->layout_object->_fetch('content_cash_desk/payment_result.tpl');
}
$country_id = $provider->countryIdByIso((string)$data['country_iso']);
// Erlaubte Laender fuer Express (Setting <modul>_express_countries, Standard DE):
// PayPal-Konten gibt es weltweit, geliefert wird aber nur, wohin der Shop liefert.
$allowed = array_filter(array_map('trim', explode(',', strtoupper($provider->expressCountries()))));
$iso = strtoupper((string)$data['country_iso']);
$country_id = in_array($iso, $allowed, true) ? $provider->countryIdByIso($iso) : 0;
if ($country_id <= 0) {
$this->layout_object->assign('call', 'payment_error');
$this->layout_object->assign('provider_label', $provider->label());