developer:soap:methods:updatemerchant

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:updatemerchant [2008/02/13 08:33]
nell
developer:soap:methods:updatemerchant [2009/01/19 14:45]
hmcgowan
Line 48: Line 48:
    
 ==== 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 { 
  
-   $objMerchant=new MerchantObject();​  +  ​$objMerchant=new MerchantObject();​  
-   ​$MerchantID='​2';​  +  $MerchantID='​2';​  
-          print_r($objMerchant); ​+  print_r($objMerchant); ​
  
-   $res=$client->​updateMerchant($restoken,​$MerchantID,​$objMerchant);​  +  ​$res=$client->​updateMerchant($restoken,​$MerchantID,​$objMerchant);​  
-          print_r($res); ​    +  print_r($res); ​    
     ​     ​
-   $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();​  +catch (SoapFault $e) {  
-     ​die("​updateMerchant failed: " .$e->​getMessage()); ​+  echo $client->​__getLastRequest();​  
 +  echo $client->​__getLastResponse();​  
 +  die("​updateMerchant failed: " .$e->​getMessage()); ​
  
  
developer/soap/methods/updatemerchant.txt · Last modified: 2009/07/06 10:55 by epouchak

Page Tools