Added capability for API to be configured to operate in test modes.

When in test_mode, API can now have testModeSettings set to 1
(causing Completed status to be returned) and 2 (causing Pending to
be returned). Any other value causes Declined to be returned.
Merge pull request #1 from r3s7/add-test-mode-settings

Added capability for API to be configured to operate in test modes.