Wierd behaviour of NuSoap library, i try to call a function with an array of params described in WSDL but it doesn't send any params just the call of the function
I've tried with other WSDL's and it works, but with this one..it doesn't ..
I can't tell though the URL of the WSDL nor the provider but i can describe what i am doing...
Please anyone help, i'm desperate because i'm stuck..
WSDL gives an error if i don't use utf-8 so i added 2 lines for it. C_Transaction_ID is optional
require_once('nusoap-0.7.3/lib/nusoap.php');
$wsdl='transaction.xml';
$client->soap_defencoding="utf-8";
$client->decode_utf8=true;
$TransData=array(
'C_Billing_Address' => '1508 Street',
'C_Billing_City' => 'Seattle',
'C_Billing_StateProvince' => 'WA',
'C_Billing_PostalCode' => '98101',
'C_Billing_Country' => 'USA',
'C_Shipping_Address' => '19 Fifth Ave N',
'C_Shipping_City' => 'Seattle',
'C_Shipping_State_Province' => 'WA',
'C_Shipping_Postal_Code' => '98109',
'C_Shipping_Country' => 'USA',
'C_Customer_First_Name' => 'dfkkfjsk',
'C_Customer_Last_Name' => 'fkjksfjk',
'C_Customer_IP' => '201.99.95.15',
'C_Customer_Email' => 'anid@mymail.com',
'C_Customer_Phone' => '201-555-1234',
'C_Credit_Card_Number' => '4111111111111111',
'C_Expiration_Month' => 3,
'C_Expiration_Year' => 2010,
'C_Credit_Card_CVV_Code' => '111',
'C_Credit_Card_800_Number' => '1-888-888-1234',
'C_Merchant_ID' => 'fskfjsfjkj',
'C_Terminal_ID' => 'fskjffksfl',
'C_Merchant_Verification_Code' => 'fskfsjfjshfjhjkfhf',
'C_Transaction_Reference_Number' => '12345',
'C_Transaction_Amount' => '9.99',
'C_Currency' => 'USD',
'C_Transaction_ID'=> ''
);
$result = $client->call("DoTransaction", $TransData);
if ($client->fault) {
echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
Now the request sent should include the params in the array but it doesn't it just sends
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1103="http://tempuri_org">
<SOAP-ENV:Body>
<DoTransaction xmlns="https://HIDDEN_URL_BY_ME" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
as you notice i'm using https as well, but that doesn't seem to be a problem.
On the debug data it seems to process all the values of the parameters as it gets them from WSDL correctly
Then it serializing the params from the array but this is shown only on the debug log, but the sent data doesn't correspond and the response is something like general error params incorrect. As i can't test on the other side what it sends nor sniff because it's https..i don't know what to do next..
Please someone help or give me an ideea what to do next..
Thank you in advance