Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

adds comments about confusing test mode nomenclature mis-match… #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jasonfb
Copy link
Contributor

@jasonfb jasonfb commented May 11, 2016

between gateway code and Auth .Net; also adds ActiveSupport deprecation notice if you fail to have your preferred server set to 'live' or 'test'; defaults to 'live' gateway with test-mode set to false (also set test mode to false; unlike other gateways, it does not determine if the test server is used)

@jasonfb
Copy link
Contributor Author

jasonfb commented May 11, 2016

@Senjai

since test_mode is defined on the base objects, I don't see anyway to 'take it off' these two objects (where it really shouldn't exist). As a compromise, I've made it default to false with comments as warning messages that its meaning is different for Authorize .Net than from the other payment gateways and to warn people to make sure their 'preferred server' is set to either 'live' or 'test'

…n gateway code and Auth .Net; also adds ActiveSupport deprecation notice if you fail to have your preferred server set to 'live' or 'test'; defaults to 'live' gateway with test-mode set to false (also set test mode to false; unlike other gateways, it does not determine if the test server is used)

adding test_mode set to false by default with message about overloading the base class's implementation
@jasonfb
Copy link
Contributor Author

jasonfb commented May 11, 2016

@Senjai -- since I can't remove it, I've added it with :default => false to one of the objects (one already had it) so that at least it is consistent. Although not perfect, I think this a reasonable way forward.

# DO NOT TURN TEST MODE TO ON (EVEN IN QA/STAGING ENVIRONMENTS), it will return 0 as transaction ids under all circumstances

# here, it overloads the setting on the base class, which confusingly defaults to true
preference :test_mode, :boolean, :default => false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want this to always be false, maybe we should override the implementation of preferred_test_mode to always return false.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants