Skip to content
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

Feature Request: Automatically use Live/Test mode keys #100

Open
vnathalye opened this issue Apr 4, 2019 · 6 comments
Open

Feature Request: Automatically use Live/Test mode keys #100

vnathalye opened this issue Apr 4, 2019 · 6 comments
Labels
feature-suggestion Suggestions for new Features

Comments

@vnathalye
Copy link

Currently the plugin only accepts 1 set of Key ID and Key Secret. So we can either configure it to use Test mode keys or Live mode keys.

When we backup our site and restore it on different environment we need to remember to change the keys. If we fail to do so wrong keys get used.

To avoid this problem I'm proposing this feature:
Allow user to configure both Test Mode keys and Live Mode keys in the plugin settings. (Currently there are only 2 fields: Key ID and Key Secret. Instead of that there should be 4 fields namely Test Mode Key ID, Test Mode Key Secret, Live Mode Key ID and Live Mode Key Secret.)
Along with this, ask for the URLs where the Live Mode keys should be used. (Note there could be multiple URLs where live mode keys should be used.)
For any URLs that are not listed above, Test Mode keys should be used.

This way it will be one time activity to configure the test mode, live mode keys along with the URLs. Once that is done, no matter how many times we backup / restore the site across environments, the right set of keys will automatically get used.

@captn3m0
Copy link
Contributor

Along with this, ask for the URLs where the Live Mode keys should be used.

This sounds quite complicated. But I like the general idea: support both live and test mode, so configuration is one-time.

@vnathalye
Copy link
Author

If you don't ask for PROD urls, how will you decide in plugin code, when to use Live Mode Keys and when to use Test Mode keys?
If you have some alternative idea plz share your thoughts. I could not think of any.

@captn3m0
Copy link
Contributor

Maybe a specific tag on certain products that marks them as "Test" products?

@vnathalye
Copy link
Author

That will make the decision of using Test Mode / Live Mode keys product dependent, isn't it?
Moreover when we take the backup of PROD and restore it on Test environment, it is going to copy all the products as well. So we will need to recreate the Test product after each restore operation. That is as good as changing the Keys after each restore and effectively defeats the purpose of this feature request, IMHO.

@vnathalye
Copy link
Author

The advantage of using PROD Urls is that it is not going to change very often, if at all it changes. And moreover, it uniquely identifies when the Live Mode keys should be used.
Note: I'm suggesting the use of multiple PROD Urls. So if someone wants to use Live Mode keys in multiple environments they will still be able to do so by adding Urls of all such environments.

Any thoughts?

@captn3m0 captn3m0 added the feature-suggestion Suggestions for new Features label Apr 29, 2019
@KoolPal
Copy link
Contributor

KoolPal commented Aug 15, 2020

@captn3m0 May I suggest that you provide a simple drop down / radio button to select LIVE / Test Mode?
This along with provision to capture BOTH Key ID & Key Secret should suffice in a simple manner.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-suggestion Suggestions for new Features
Projects
None yet
Development

No branches or pull requests

3 participants