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.