developer:soap-1.2:methods:updatemerchant

Differences

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

Link to this comparison view

developer:soap-1.2:methods:updatemerchant [2010/02/12 11:46] (current)
hmcgowan created
Line 1: Line 1:
 +<embed ..:​contents/>​====== updateMerchant ======
 +
 +**Reseller only method.**
 +
 +Update details in a merchant'​s account.
 +
 +===== Description =====
 +
 +Allows a reseller to update the information on file for a merchant account.
 +
 +The following fields may be updated via this method: ​
 +
 +  * Merchant ID 
 +  * Contact ​
 +  * Company ​
 +  * Street ​
 +  * Street 2 
 +  * City 
 +  * State 
 +  * Zip 
 +  * Country ​
 +  * Email 
 +  * Fax 
 +  * Phone Number ​
 +  ​
 +
 +See also [[addMerchantApplication]],​ [[getMerchantApplicationStatus]],​ [[getMerchant]],​ [[deleteMerchant]],​ [[searchMerchants]],​ [[getMerchantSummary]],​ [[getMerchant]] ​
 +
 +===== Syntax =====
 +
 +boolean **updateMerchant** ( [[..:​objects:​ueSecurityToken]] Token, integer MerchantID, [[..:​objects:​MerchantObject]] MerchantObject ) 
 +
 +
 +===== Arguments =====
 +
 +^Type    ^Name    ^Description ​   ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Reseller security token, used to identify reseller and validate request.|
 +|integer |MerchantID |Merchant ID number assigned by the gateway to an active merchant.|
 +|[[..:​objects:​MerchantObject]] |MerchantObject |Merchant account information including: ID, Company, Contact, Address, Email, Phone, and Fax. |
 +
 +
 +
 +===== Return Value =====
 +
 +|boolean |Returns confirmation of update only if successful. If update fails, an exception will be thrown. |
 +
 +===== Examples =====
 + 
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +try { 
 +
 +  $objMerchant=new MerchantObject(); ​
 +  $MerchantID='​2'; ​
 +  print_r($objMerchant); ​
 +
 +  $res=$client->​updateMerchant($restoken,​$MerchantID,​$objMerchant); ​
 +  print_r($res); ​    
 +    ​
 +  $this->​assertEquals($res->​MerchID,​$MerchantID); ​
 +
 +  $this->​assertEquals($res->​Zip,​ '​12311'​); ​
 +                         
 +  } 
 +
 +catch (SoapFault $e) { 
 +  echo $client->​__getLastRequest(); ​
 +  echo $client->​__getLastResponse(); ​
 +  die("​updateMerchant failed: " .$e->​getMessage()); ​
 +
 +
 +?> 
 +</​code>​
 +
  
developer/soap-1.2/methods/updatemerchant.txt ยท Last modified: 2010/02/12 11:46 by hmcgowan

Page Tools