DeleteCustomerPaymentMethodProfile

Description

This method allows you to delete a specific payment method stored for a particular customer.

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 DeleteCustomerPaymentMethodProfile(SecurityToken securityToken, string customerToken, string paymentMethodId)

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)

string

paymentMethodId

ID of payment method. (required)

Return Value

bool

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:DeleteCustomerPaymentMethodProfile>
         <ebiz:securityToken>
            <ebiz:SecurityId>cfa8fd6a-2902-4a3e-86f1-15b94a181284</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerToken>60937939</ebiz:customerToken>
         <ebiz:paymentMethodId>122</ebiz:paymentMethodId>
      </ebiz:DeleteCustomerPaymentMethodProfile>
   </soapenv:Body>
</soapenv:Envelope>
string customerToken = "60937939";
          pm.MethodID = "122";
            
            try
            {
                bool pmResult = client.DeleteCustomerPaymentMethodProfile(securityToken, customerToken, paymentMethodId);
                MessageBox.Show("Payment method successfully deleted");

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