-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure 3ds contingency uses SCA_ALWAYS
instead of 3D_SECURE
(521)
#464
Conversation
Change the 3D SECURE contingency to SCA_ALWAYS
$this->settings->set( '3d_secure_contingency', 'SCA_ALWAYS' ); | ||
$this->settings->persist(); | ||
|
||
$redirect_url = admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should redirect to the cards tab? admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway&ppcp-tab=ppcp-credit-card-gateway
Or maybe redirect not needed here at all.
Also as I understand it is executed only if the merchant saves settings. Maybe better to do that simply on some kind of plugin init/upgrade, such as woocommerce_paypal_payments_gateway_migrate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, much better on plugin upgrade, thanks!
add_action( | ||
'woocommerce_paypal_payments_gateway_migrate', | ||
static function () use ( $c ) { | ||
$settings = $c->get( 'wcgateway.settings' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a type hint here to help psalm and IDE.
assert( $settings instanceof Settings );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! :)
SCA_ALWAYS
instead of 3D_SECURE
SCA_ALWAYS
instead of 3D_SECURE
(521)
Add improvements to #463.
This PR ensures that
SCA_ALWAYS
is used instead of3D_SECURE
stored in the database: https://github.com/woocommerce/woocommerce-paypal-payments/pull/463/files#diff-01a2758cc519d8adb065af0350c9459edb64a45576b4a2e527e8d2059c7889cbL1922-R1922Testing package
PCP-521-woocommerce-paypal-payments.zip
Acceptance criteria
SCA_WHEN_REQUIRED
.3D_SECURE
option saved,SCA_ALWAYS
option value should be automatically updated**Note that only the value is updated, the option label is still the same (Always trigger 3D Secure).
Also note that in order to trigger the update the plugin needs to be upgraded, the provided package contains a higher plugin version which needs to be uploaded and installed from Plugins admin screen (replace existing with the new one).