I am trying to re-write a Drupal module that has fallen behind the API of the gateway it connects to.
A stripped back version of the code I think is causing the problem is as follows:
$namespace = ($this->testing) ? 'https://api.sandbox.ewaypayments.com/' : 'https://api.ewaypayments.com/';
$endpoint = $this->url;
$httpUsername = $this->user_name;
$httpPassword = $this->password;
$client = new nusoap_client($endpoint, TRUE);
$client->setCredentials($httpUsername, $httpPassword, 'basic');
$client->response_timeout = 50;
$result = $client->call($operation, array('request' => $params), $namespace);
The $result
is consistently false. If I put anything like this into my code it also consistently returns empty
:
$error = $client->getError();
watchdog('connection_message', $error);
I'm a bit out of my depth and without any error messages in my Apache logs or in the Drupal watchdog I cannot see a way forward.