Updates and bugfixes for QuickPay gateway

Replaces PR #1186

Doh, sorry.  You did exactly what you said you were going to do and took the best from both.  Thanks for the clarification!