Currently trying to update some legacy code to use PHP SOAP instead of the old NuSOAP library. The issue I'm having is that the current code has the following:
$parameters = array(
'request' => array(
'UserCredentials' => array(
'Username' => $username,
'Password' => $password,
'AgentID' => $ResellerID,
),
'UserConsent' => 'Yes',
'ServiceType' => 'MPF',
)
);
$parameters['request']['RequestDetails'] = new soapval('RequestDetails', 'TelephonePostcodeRequest', array('TelephoneNumber' => $phone_number, 'Postcode' => $post_code), false, "tns", false);
The problem is that soapval needs to be replaced with what I assume SoapVar() ? I've attempted the following
$parameters['request']['RequestDetails'] = new SoapVar(array('TelephoneNumber' => $phone_number, 'Postcode' => $post_code), XSD_STRING, 'TelephonePostcodeRequest');
with no luck. How can I get a similar object to pass through to the SOAP request?