简体   繁体   中英

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

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']
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM