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
Last revision Both sides next revision
developer:soap:methods:getmerchant [2008/03/13 11:54]
vladg
developer:soap:methods:getmerchant [2009/01/19 14:38]
hmcgowan
Line 34: Line 34:
  
 ==== 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://​wiki.usaepay.com/​developer/​soap/​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