Problem/Motivation

At present, the URL to which we're posting API calls is kept in 3 places:

This is a recipe for development problems, since people developing this module have to switch these URLs in all 3 places in order to post their test transactions to the -v "validation environment," then remember to switch them back to the production env before making commits.

Proposed resolution

We already tried one approach to this and had to back it out because we got some pushback on the potential confusion for non-developers of a "Use validation environment?" checkbox on the gateway create/edit form. See the commit where we backed all that out for an idea on how to implement the following:

  1. At least centralize the baseUrl value in one place (probably Gateway.php) and have it flow through to the others, so that devs only have to change it in that one place.
  2. If possible, come up with a non-confusing UX for either switching between validation and prod envs, and through that UX, expose this choice to appropriately technical site users.

Comments

bdimaggio created an issue.