How to use NUSOAP in my custom module?
I think I've had a similar issue in the past with a different payment gateway.

Inspect each variable (print_r or var_dump) one after another comparing the values between your stand alone php file and the drupal module.

When you find the point at which there is a difference you know what line it's going wrong.

Maybe shout at it a bit at this point, give it a prod, read some more API documentation and then you should almost be there ;)