feat(payments): Express-Adressen nur aus erlaubten Laendern (Setting express_countries, Standard DE)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user