I don't think it is AlertPay's policy to support such custom scripts. Also it's very difficult to debug something that you do not have the access code to. There are many possible causes to the problems. My best guesses:
-you are truncating the __VIEWSTATE encrypted string
-you are not passing all the hidden fields between pages
-Your https request is not properly formed or is missing other information
If you are still experiencing problems, private message me the scripts and I can take a look at it. I'm very busy at the moment so I can't promise that I'll solve your problem.
Robin, B. Eng.
Software Developer
AlertPay.com