Refactor pay-flow-test.js to use more shared helper functions and variables.
Refactor pay-flow-test.js to use more shared helper functions and variables.

subscriptions-project/swg-js,subscriptions-project/swg-js,subscriptions-project/swg-js