updateMerchant

Reseller only method

Description

Allows a reseller to update the information on file for a merchant account.

The following fields may be updated via this method: * 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 ( ueSecurityToken Token, integer MerchRefNum, Merchant Merchant )

Arguments

Type Name Description
ueSecurityToken Token Reseller security token, used to identify reseller and validate request.
integer MerchRefNum Merchant ID number assigned by the gateway to an active merchant.
Merchant Merchant 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 PHP Soap How-to.

    <?php 

    try { 

      $objMerchant=new MerchantObject(); 
      $MerchRefNum='2'; 
      print_r($objMerchant); 

      $res=$client->updateMerchant($restoken,$MerchRefNum,$objMerchant); 
      print_r($res);     


      } 

    catch (SoapFault $e) { 
      echo $client->__getLastRequest(); 
      echo $client->__getLastResponse(); 
      die("updateMerchant failed: " .$e->getMessage()); 
    } 

    ?> 

.NET C

    string merchantID = "133534";

                reseller.Merchant merchant = new reseller.Merchant();
                merchant.MerchantName = "Another company";

                Boolean response;
                try
                {
                    response = reclient.updateMerchant(retoken, merchantID, merchant);
                    MessageBox.Show(string.Concat(response));
                }
                catch (Exception err) {
                    MessageBox.Show(err.Message);
                }

Java

                BigInteger merchrefum = new BigInteger("117821");

                Merchant merchchange = new Merchant();

                merchchange.setMerchantName("New Company Name");
                ContactInfo contactinfo = new ContactInfo();
                contactinfo.setContact("John Doe");
                contactinfo.setStreet("1234 Main");
                contactinfo.setStreet2("Suite 800");
                contactinfo.setCity("Los Angeles");
                contactinfo.setState("CA");
                contactinfo.setZip("11221");
                contactinfo.setCountry("US");
                contactinfo.setEmail("tim@tmcode.com");
                contactinfo.setPhone("223-222-1121");
                contactinfo.setFax("590-223-9902");
                merchchange.setContactInfo(http://help.newtekgateway.com/developer/soap-api/boarding/objects/contactinfo/);

                client.updateMerchant(restoken, merchrefum, merchchange);