UpdateCustomerPaymentMethodProfile

This method allows you to update an existing payment method for a customer.

Description

Updates the existing payment method. MethodID is used to determine which payment method to update.
This method requires the use of the customerToken, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer's customerToken, use the
GetCustomerToken method to find the correct customerToken.

Syntax

bool UpdateCustomerPaymentMethodProfile(SecurityToken securityToken, string customerToken, PaymentMethodProfile PaymentMethodProfile)

Arguments

Type

Name

Description

SecurityToken

securityToken

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

string

customerToken

Unique customer token assigned by the gateway. (required)

PaymentMethodProfile

PaymentMethodProfile

Updated profile. (required)

Return Value

boolean

Returns true if payment method is updated successfully. If this fails, an exception will be thrown.

Examples

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:UpdateCustomerPaymentMethodProfile>
         <ebiz:securityToken>
            <ebiz:SecurityId>rf25758d-57c3-4f40-8e36-17bf6fd5b2cb</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerToken>9197504</ebiz:customerToken>
         <ebiz:paymentMethodProfile>
            <ebiz:MethodID>686</ebiz:MethodID>
            <ebiz:MethodName>V11</ebiz:MethodName>
            <ebiz:AvsStreet>20 Pacifica</ebiz:AvsStreet>
            <ebiz:AvsZip>92618</ebiz:AvsZip>
            <ebiz:CardExpiration>1223</ebiz:CardExpiration>
            <ebiz:CardNumber>XXXXXXXXXXXX2226</ebiz:CardNumber>
         </ebiz:paymentMethodProfile>
      </ebiz:UpdateCustomerPaymentMethodProfile>
   </soapenv:Body>
</soapenv:Envelope>
eBizChargeConnectSOAP.PaymentMethodProfile pm = new eBizChargeConnectSOAP.PaymentMethodProfile();

         

            string customerToken = "9197504";
            string CCnum = "XXXXXXXXXXXX7779;

            pm.MethodID = "19";

            pm.CardNumber = "XXXXXX" + CCnum.Substring(6, (CCnum.Length - 6));
            pm.CardExpiration = "1225";
            pm.AvsStreet = "20 Pacifica";
            pm.AvsZip = "92618";
      
            pm.MethodName = "New Name";
            pm.AccountHolderName = "Tim Smith";

            try
            {
                bool pmResult = client.UpdateCustomerPaymentMethodProfile(securityToken, customerToken, pm);
                MessageBox.Show("Payment method successfully updated");

            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }