developer:soap:methods:updatecustomerpaymentmethod

Differences

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

Link to this comparison view

developer:soap:methods:updatecustomerpaymentmethod [2009/07/24 00:49] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​
 +
 +====== updateCustomerPaymentMethod ======
 +
 +This method allows you to update an existing payment method for a customer.
 +
 +
 +===== Description =====
 +
 +Updates the existing payment method. PaymentMethod.MethodID is used to determine which payment method to update.
 +
 +See also [[runCustomerTransaction]],​ [[enableCustomer]],​ [[disableCustomer]],​ [[deleteCustomer]],​ [[searchCustomerID]],​ [[getCustomer]],​ [[searchCustomers]],​ [[getCustomerHistory]],​ [[addCustomer]],​ [[deleteCustomerPaymentMethod]],​ [[updateCustomer]],​ [[quickUpdateCustomer]] ​
 +
 +
 +===== Syntax =====
 +
 +integer **updateCustomerPaymentMethod** ( [[developer:​soap:​objects:​ueSecurityToken]] Token,​[[developer:​soap:​objects:​PaymentMethod]] PaymentMethod,​ boolean Verify ) 
 +
 +
 +===== Arguments =====
 +
 +^Type    ^Name    ^Description ​   ^
 +|[[developer:​soap:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction.|
 +|[[developer:​soap:​objects:​PaymentMethod]] |PaymentMethod |Includes method name, description,​ ID, and expiration date.|
 +|boolean |Verify |If set to true, an AuthOnly verification of the credit card validity will be run. (See above.) |
 +
 +
 +===== Return Value =====
 +
 +|boolean |Returns true if payment method is updated successfully. |
 +
 +===== Examples =====
 +
 +==== 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>
 +<?​php ​
 +
 +try { 
 +
 +  $CustNum='​586'; ​
 +  $PaymentMethod=array( ​
 +    '​MethodID'​ => '​0', ​
 +    '​MethodName'​=>'​Example', ​
 +    '​Expires'​=>'​0909', ​
 +    '​CreditCardData'​ => array( ​
 +      '​CardNumber'​=>'​4444555566667779', ​
 +      '​CardExpiration'​=>'​0908', ​
 +      '​CardType'​=>'', ​   ​
 +      '​CardCode'​=>'', ​
 +      '​AvsStreet'​=>'', ​
 +      '​AvsZip'​=>'',  ​
 +      '​CardPresent'​=>'', ​
 +      '​MagStripe'​=>'', ​
 +      '​TermType'​=>'', ​
 +      '​MagSupport'​=>'', ​
 +      '​XID'​=>'',  ​
 +      '​CAVV'​=>'', ​
 +      '​ECI'​=>'', ​
 +      '​InternalCardAuth'​=>'',  ​
 +      '​Pares'​=>'' ​
 +      ), 
 +    '​CheckData'​=>​array( ​
 +      '​CheckNumber'​=>'',  ​
 +      '​Routing'​=>'', ​
 +      '​Account'​=>'', ​
 +      '​SSN'​=>'', ​
 +      '​DriversLicense'​=>'', ​
 +      '​DriversLicenseState'​=>'' ​
 +      ), 
 +    '​SecondarySort'​=>​0 ​
 +    ); 
 +
 +  $Default=true; ​
 +  $Verify=true; ​
 +
 +  $res=$client->​addCustomerPaymentMethod($token,​$CustNum,​ $PaymentMethod,​ $Default, $Verify); ​
 +  ​
 +  $this->​assertTrue($res>​0,​ '​Positive PaymentMethodID'​);  ​
 +                 
 +  print_r($res); ​
 +         
 +
 +
 +catch(SoapFault $e) { 
 +     
 +  echo "​\n\nResponse:​ " . $tran->​__getLastResponse(); ​
 +  die("​soap fault: " .$e->​getMessage()); ​
 +  echo "​SoapFault:​ " .$e->​getMessage(); ​
 +
 +  print_r($e); ​
 +
 +  echo "​\n\nRequest:​ " . $tran->​__getLastRequest(); ​
 +         
 +
 +
 +?> 
 +</​code>​
 +
 +===== Change Log =====
 +
 +^Version ^Change ^
 +|1.2 | Method added. ​ |
 +
 +
  
developer/soap/methods/updatecustomerpaymentmethod.txt ยท Last modified: 2009/07/24 00:49 by tem

Page Tools