#134: Credit card errors

I also included a couple of miscellaneous fixes in this pull request which I happened to be working on at the same time.
A better approach IMO would be writing unit tests for this function.  The problem with having it work like this all the time is that in order to actually use the prereg system, we have to fiddle with the settings about when prereg opens.  Which we can certainly do, but having a new person bringing up a dev instance need to edit their config file before they can test the most basic functionality is more trouble than it's worth, compared to writing a unit tests, where we can make assertions about every branch.

Of course, there aren't actually unit tests for ANY of the prereg stuff yet :/