Currently, it's quite easy to accidentally pull down a live-configured database and accidentally run transactions using real credentials on a development site. This is exasperated by use of the recurring framework.
Patch creates a system-level variable that defaults to forcing your site into TEST mode. The hook_update should provide backwards-compatibility. We probably also need a way to set this variable in the UI, but the intention here is to use settings.php to configure this variable anyway.
More ideal would be if we could get full Oauth tokenized authentication, but that would require API changes.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_iats-override_service_settings-2631312-2.patch | 1.24 KB | mikemccaffrey |
system_level_test_mode_variable.patch | 2.34 KB | gcb | |
Comments
Comment #2
mikemccaffreyRather than indirectly defining a test mode in order to switch the payment server credentials, this patch will allow you to directly override the credentials for a payment method in your settings.php file.
Comment #3
capellicWould love to see a solution adopted.
Comment #4
gcb@capellic have you tried either of these patches? I think mikemccaffrey's is a cleaner solution but we have only tested it in one implementation. Can you give it a try and tell us if it works for you?
Comment #5
Greg BoggsComment #6
ruscoe CreditAttribution: ruscoe at ThinkShout commentedComment #7
capellicI haven't had a chance to review these patches, sorry, but came over to the iATS queue after this module caught my eye: https://www.drupal.org/project/commerce_payment_settings_switcher. Looks like several Commerce payment modules are using this and it might be a better way to go? Not suggesting it is, just throwing it in to the mix for consideration.
Comment #9
ruscoe CreditAttribution: ruscoe at ThinkShout commentedWe've gone with @mikemccaffrey's patch here. It gets the job done cleanly.
@capellic, I looked over the commerce_payment_settings_switcher module and it looks like it would work, but I think for something this simple we can avoid adding a dependency.
Comment #10
capellicSounds good, thank you.