Closed guzzilar closed 4 years ago
It's actually possible to simplify this even further. Just do the redirect every time. Don't check anything
I was considering about that approach. But kinda still want to achieve our main key feature, the white-label one.
I don't know what you mean
I mean, one of the Omise key features is to have an experience of seamlessly checkout. I wanted to achieve that goal by not redirect buyers out of a store if it does not need to.
tested, works good..
Fair enough, but the redirect is for a split second (certainly not distracting) and there is no impression they ever left the site - especially if implemented in the way that Visa and the EU advise - in an iframe. It just seems like an unnecessary bit of code to achieve something extremely minor. Works though, if unduly complex. Approving
but the redirect is for a split second (certainly not distracting) and there is no impression they ever left the site
I think this is working on Shopify because its payment behaviour. As it's kinda default thing to redirect to a payment-provider checkout form in Shopify, so we have a perception of redirecting between site to site already β adding one more loading screen or a split second seems to be nothing.
However, thanks for reviewing ;)
1. Objective
A mistake has been happened repeatedly when it comes to enable 3-D Secure feature on Omise plugin. As the current flow of enabling 3-D Secure on Omise-WooCommerce is as the following:
However, the third step is where thing gets complicated and mistake occurs. Either "enable 3-D Secure on the plugin but not on Omise account" or "enable 3-D Secure on Omise account but not on Omise plugin".
This pull request is to reduce the amount of this issue by programmatically detect if a particular charge is likely to be processed with 3-D Secure feature, then automatically redirect buyers out without having to alter any setting.
Related information: Related issue(s): T17199, T17237 (internal ticket)
2. Description of change
Removing "3-D Secure" option out from the Credit Card payment setting page.
Programmatically detect if a particular charge (using credit card as a payment method) is processing using 3-D Secure feature (or likely to be).
3. Quality assurance
π§ Environments:
βοΈ Details:
Making sure that there is no side-effect on a charge that does not require 3-D Secure payment.
β 1. Create a new charge using Omise Japan account with Credit Card payment method. Expectation A new charge should be created properly the same as before this change, and there must not be any redirection happening during the process.
β 2. Create a new charge using Omise Singapore account with Credit Card payment method. Expectation A new charge should be created properly the same as before this change, and there must not be any redirection happening during the process (as this test is using an account that 3-D Secure feature isn't enabled).
β 3. Create a new charge using Omise Thailand account "WITHOUT 3-D Secure" with Credit Card payment method. Expectation A new charge should be created properly the same as before this change, and there must not be any redirection happening during the process.
β 4. Create a new charge using Omise Thailand account "WITH 3-D Secure enabled" with Credit Card payment method. Expectation A new charge should be created properly the same as before this change, and plugin should be able to detect that a particular charge is in a condition that redirection is needed β user should be redirected out to
authorize_uri
.β 5. Searching, if this
omise_3ds
option is being used anywhere else Expectation Should found nothing.4. Impact of the change
There should be no negative impact. However, it would tremendously positively impact with Omise support team and merchants to reduce the communication regarding on "how to turn on 3-D Secure mode in Omise-WooCommerce plugin".
5. Priority of change
Normal
6. Additional Notes
! IMPORTANT; This is to remove the setting out from the user interface. However, the option that has already been saved within WordPress DB for current merchants that have been using Omise-WooCommerce plugin, will still be existed.
Using this query:
SELECT option_value FROM wp_options WHERE option_name='woocommerce_omise_settings';
The screenshot above shows that the optionomise_3ds
is existed, its value could be eitheryes
orno
. However, it shall have no effect to this change.Why not remove it? You may ask. The reason is that I don't want this PR gets too elaborated. Touching on merchant's DB is a bit risky while the actual fix doesn't need to do that.
We may provide a different PR to clean up Omise settings later on, if needed. ...
Also, note that this would benefit for the dynamic 3-D Secure as well.