UpdateCustomerPaymentMethodProfile

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

Description

This 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

function updateCustomerPaymentMethodProfile()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '********-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$paymentMethodProfile = array(
'MethodID' => '19',
'CardNumber' => '4000100011112224',
'CardExpiration' => '1225',
'AvsStreet' => '20 Pacifica',
'AvsZip' => '92618',
'MethodName' => 'New Name',
'AccountHolderName' => 'Tim Smith'
);
$UpdateCustomer = $client->UpdateCustomerPaymentMethodProfile(
array(
'securityToken' => $securityToken,
'customerToken' => '9197504',
'paymentMethodProfile' => $paymentMethodProfile
))
;
$updateCustomerResult = $UpdateCustomer->UpdateCustomerPaymentMethodProfileResult;
}
<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>********-57c3-4f40-8e36-********</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>