Alex
Alex

Reputation: 1060

NuSOAP sending array of string

The web service method I am trying to use can be seen here

http://documentation.rezexchange.com/cwi/cwidocumentation.html#Link9A

I am sending a NuSOAP request with these parameters

 $param = array(
    "PropertyCode" => get_option('re_propertycode'),
    "RateTypes" =>  array(
        "SSDB"
    ),
    "StartDate" => date('c', strtotime($rezStart)),
    "EndDate" => date('c', strtotime($rezEnd)),
    "Adults" => 1,
    "Children" => 0,
    "Infants" => 0
);

The request is ok except it is not recognising SSDB as I must be sending the array of strings in the wrong way.

Any help much appreciated

Upvotes: 1

Views: 952

Answers (1)

Alex
Alex

Reputation: 1060

Fixed with the following format

 $param = array(
    "PropertyCode" => get_option('re_propertycode'),
    "RateTypes" =>  array("string" => array("SSDB", "2NGT")),
    "EndDate" => date('c', strtotime($rezEnd)),
    "Adults" => $_POST['Adults'],
    "Children" => $_POST['Children'],
    "Infants" => $_POST['Infants']
);

Upvotes: 1

Related Questions