updateCustomerPaymentMethod

Parent Previous Next

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.

 

Syntax

integer updateCustomerPaymentMethod ( ueSecurityToken Token,PaymentMethod PaymentMethod, boolean Verify )

 

Arguments

 

Type

Name

Description

ueSecurityToken

Token

Merchant security token: used to identify merchant and validate transaction.

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

 

<?php

try {

 $CustNum='4268705';

 $PaymentMethod=array(

   'MethodID' => '375',

   'MethodName'=>'',

   'CardNumber'=>'XXXXXXXXXXXX7779',

   'CardExpiration'=>'2013-02',

   'CardType'=>'',    

   'CardCode'=>'',

   'AvsStreet'=>'',

   'AvsZip'=>'',  

   'CardPresent'=>'',

   'MagStripe'=>'',

   'TermType'=>'',

   'MagSupport'=>'',

   'XID'=>'',  

   'CAVV'=>'',

   'ECI'=>'',

   'InternalCardAuth'=>'',  

   'Pares'=>'',

   'SecondarySort'=>0,

   );

 $Verify=false;

 $res=$client->updateCustomerPaymentMethod($token,$PaymentMethod,$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();

}

?>

 

 

.NET VB

Dim method As eBizCharge.PaymentMethod = New eBizCharge.PaymentMethod

       method.MethodID = "39"

       method.MethodName = "My different"

       method.CardExpiration = "1212"

       method.CardNumber = "4444555566667779"

       Dim verify As Boolean

       verify = True

       Dim response As Boolean

       response = client.updateCustomerPaymentMethod(token, method, verify)

       MessageBox.Show(String.Concat(response))

 

 

.NET C#

 

           eBizCharge.PaymentMethod method = new eBizCharge.PaymentMethod();

           method.MethodID = "19";

           method.MethodName = "My different";

           method.CardExpiration = "1212";

           method.CardNumber = "4444555566667779";

           Boolean verify = true;

           Boolean response;

           try

           {

               response = client.updateCustomerPaymentMethod(token, method, verify);

               MessageBox.Show(string.Concat(response));

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

: