For directions on how to set up the WSDL link, create “$restoken” and “$client”, go to PHP Soap How-to.
<?php
try {
$search=array(
array('Field'=>'State', 'Type'=>'eq','Value'=>'CA'),
array('Field'=>'Contact', 'Type'=>'eq', 'Value'=>'John Doe'),
array('Field'=>'Company', 'Type'=>'eq', 'Value'=>'DidorightInc.')
);
$start=0;
$limit=100;
$matchall=true;
$sortby='merchid';
$res=$client->searchMerchantsCount($restoken,$search,$matchall,$start,$limit, $sortby);
print_r($res);
}
catch (SoapFault $e) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
die("searchMerchants failed: " .$e->getMessage());
}
?>