live vpsnet server not accessible so modified script to utilize backup database on backup server.
was missing line of code that caused credits to not be processed.
Moved parameter check line to begining.