I am using NuSOAP to consume a webservice for a payment gateway, however, the documentation for this gateway requires that:
- If the doPayment() method takes more than 300 seconds, it should immediately execute the getStatus() method at least 3 times in order to try to get a successful response.
The thing is, I don't know how to handle that timeout with PHP and NuSOAP. Does NuSOAP returns any specific response when there's a timeout? how do I now it actually timed out?
Here is a piece of code for the NuSOAP call:
$client = new nusoap_client( 'http://webserviceurl?wsdl...' , 'wsdl');
$err = $client->getError();
if ($err)
die('Constructor error: ' . $err);
$proxy = $client->getProxy();
$payTrans = $proxy->doPayment(array('someparams' => 'somevalues'));
// if doPayment() timed out, then run the getStatus() method
Any input would be greatly appreciated. Thank you!