Payments controller spec

also some helper methods accidentally added in the same branch.

All tests pass but more tests are needed.