Reseller only method.
Search active merchants.
This method allows resellers to search their database for active merchants based on specific criteria.
The following fields may be searched via this method:
If MatchAll is set to “true,” then only results matching ALL of your search criteria will be returned. If your search does not yield the desired results, eliminate some of you search terms or set MatchAll to “false.”
See also addMerchantApplication, getMerchantApplicationStatus, getMerchant, updateMerchant, deleteMerchant, getMerchantSummary
MerchantSearchResult searchMerchants ( ueSecurityToken Token, SearchParam Search, boolean MatchAll, integer Start, integer Limit, string Sort)
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Reseller security token, used to identify reseller and validate request. |
SearchParam | Search | Array of search parameters. |
boolean | MatchAll | If set to “true,” only results matching all search criteria will be returned, if set to “false,” results matching any of the search criteria will be returned. |
integer | Start | Start position, defaults to 0 (first merchant found). |
integer | Limit | Maximum number of merchants to return in result. |
string | Sort | Field name to sort the results by |
MerchantSearchResult | Returns results of active merchant search based on search parameters set. |
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->searchMerchants($restoken,$search,$matchall,$start,$limit, $sortby); } catch (SoapFault $e) { echo $client->__getLastRequest(); echo $client->__getLastResponse(); die("searchMerchants failed: " .$e->getMessage()); } ?>
reseller.SearchParam[] search = new reseller.SearchParam[1]; search[0] = new reseller.SearchParam(); search[0].Field = "State"; search[0].Type = "Contains"; search[0].Value = "CA"; Boolean matchAll = true; string start = "0"; string end = "10"; string sort = "merchid"; try { reseller.MerchantSearchResult result = reclient.searchMerchants(retoken, search, matchAll, start, end, sort); MessageBox.Show(string.Concat(result.MerchantsMatched)); } catch (Exception err){ MessageBox.Show(err.Message); }
Version | Change |
---|---|
1.2 | Added Sort Parameter |
1.1 | Soap 1.1 Release |