How to use NUSOAP in my custom module? My users have to be guided to Bank Gate to pay the money After filling a Form in my custom module. the process of leading them has to be done through NUSOAP but it seems it is not functioaning inside module! it works find when i have the same code in a php file but in module ... I have no idea what is wrong with that! this is my submit function:

function my_module_my_form_submit($form, &amp;$form_state) {

  $nusoap_path = drupal_get_path('module', 'myblock') . '/nusoap.php';
  include_once($nusoap_path);

    $client = new nusoap_client('https://de.....com/pg/services/WebGate/wsdl', 'wsdl'); 
    $client-&gt;soap_defencoding = 'UTF-8';
    $result = $client-&gt;call('PaymentRequest', array(
                                                    array(
                                                            'MerchantID'    =&gt; 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
                                                            'Amount'        =&gt; 1000,
                                                            'Description'   =&gt; 'some texts',
                                                            'CallbackURL'   =&gt; 'http://......./verify.php'
                                                        )
                                                    )
    );
    //Redirect to URL
    if($result['Status'] == 100)
    {
        $form_state['redirect'] =('https://www.......com/pg/StartPay/'.$result['Authority']);
    } else {
        echo'ERR: '.$result['Status'];
    }

}


thanks in advanced for you help
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 ;)