mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Require 3DS by default for PSD2 shop countries
This commit is contained in:
parent
ebabc45dbc
commit
521cbf4e26
2 changed files with 41 additions and 1 deletions
|
@ -335,6 +335,13 @@ return array(
|
|||
$location = wc_get_base_location();
|
||||
return $location['country'];
|
||||
},
|
||||
'api.shop.is-psd2-country' => static function ( ContainerInterface $container ) : bool {
|
||||
return in_array(
|
||||
$container->get( 'api.shop.country' ),
|
||||
$container->get( 'api.psd2-countries' ),
|
||||
true
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Currencies supported by PayPal.
|
||||
|
@ -538,4 +545,37 @@ return array(
|
|||
),
|
||||
);
|
||||
},
|
||||
|
||||
'api.psd2-countries' => static function ( ContainerInterface $container ) : array {
|
||||
return array(
|
||||
'AT',
|
||||
'BE',
|
||||
'BG',
|
||||
'CY',
|
||||
'CZ',
|
||||
'DK',
|
||||
'EE',
|
||||
'FI',
|
||||
'FR',
|
||||
'DE',
|
||||
'GB',
|
||||
'GR',
|
||||
'HU',
|
||||
'IE',
|
||||
'IT',
|
||||
'LV',
|
||||
'LT',
|
||||
'LU',
|
||||
'MT',
|
||||
'NL',
|
||||
'NO',
|
||||
'PL',
|
||||
'PT',
|
||||
'RO',
|
||||
'SK',
|
||||
'SI',
|
||||
'ES',
|
||||
'SE',
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1907,7 +1907,7 @@ return array(
|
|||
),
|
||||
'class' => array(),
|
||||
'input_class' => array( 'wc-enhanced-select' ),
|
||||
'default' => 'SCA_WHEN_REQUIRED',
|
||||
'default' => $container->get( 'api.shop.is-psd2-country' ) ? '3D_SECURE' : 'NO_3D_SECURE',
|
||||
'desc_tip' => true,
|
||||
'options' => array(
|
||||
'NO_3D_SECURE' => __( 'No 3D Secure (transaction will be denied if 3D Secure is required)', 'woocommerce-paypal-payments' ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue