developer:soap:methods:getmerchant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
developer:soap:methods:getmerchant [2008/02/13 08:29]
nell
developer:soap:methods:getmerchant [2009/01/19 14:38]
hmcgowan
Line 31: Line 31:
  
 ===== Examples ===== ===== Examples =====
 +
  
 ==== PHP ==== ==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[developer:​soap:​howto:​php|PHP Soap How-to]].
  
 <code php> <code php>
-<?​php ​ +<?php>
- +
-// for directions on how to set up the   +
-// WSDL link and create "​$restoken"​ and "​$client,"​  +
-// see: http://​usaepay.com/​developer/​howto/​php. ​+
  
 try {  try { 
  
-   $MerchantID=2; ​+  ​$MerchantID=2; ​
  
-   $res=$client->​getMerchant($restoken,​ $MerchantID); ​+  ​$res=$client->​getMerchant($restoken,​ $MerchantID); ​
  
-   $this->​assertEquals($res->​MerchID,​ $MerchantID); ​+  ​$this->​assertEquals($res->​MerchID,​ $MerchantID); ​
  
-   $this->​assertEquals($res->​Zip,​ '​12311'​); ​+  ​$this->​assertEquals($res->​Zip,​ '​12311'​); ​
                                                    
-} catch (SoapFault $e) {  
-     echo $client->​__getLastRequest(); ​ 
-     echo $client->​__getLastResponse(); ​ 
-     ​die("​getMerchant failed: " .$e->​getMessage()); ​ 
  
 +
 +catch (SoapFault $e) { 
 +
 +  echo $client->​__getLastRequest(); ​
 +  echo $client->​__getLastResponse(); ​
 +  die("​getMerchant failed: " .$e->​getMessage()); ​
 +  } 
  
 ?>  ?> 
developer/soap/methods/getmerchant.txt · Last modified: 2009/07/06 10:50 by epouchak

Page Tools