Payment view: error handling, coding style

Throw ImproperlyConfigured if a required setting is missing.
Improve code readability a little.