SetDefaultCustomerPaymentMethodProfile

Set a existing payment method as default for an existing customer.

Description

This method is used to make a specific payment method as the default for a customer.

Syntax

bool SetDefaultCustomerPaymentMethodProfile( SecurityToken securityToken, string customerToken, string paymentMethodId)

Arguments

TypeNameDescription
SecurityTokensecurityTokenMerchant security token: used to identify merchant and validate transaction. (required)
stringcustomerTokenUnique customer token assigned by the gateway. (required)
stringpaymentMethodIdUnique payment method ID assigned by the gateway. (required)

Return Value

booleanReturns confirmation of that payment method was set to default. If this fails, an exception will be thrown.

Examples

function SetDefaultCustomerPaymentMethodProfile()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$getCustomer = $client->SetDefaultCustomerPaymentMethodProfile(array(
'securityToken' => $securityToken,
'customerToken' => '9197504',
'paymentMethodId' => '1'
));
$getCustomerResult = $getCustomer->GetCustomerResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header />
   <soapenv:Body>
      <ebiz:SetDefaultCustomerPaymentMethodProfile>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-766e-44e8-9e9b-********</ebiz:SecurityId>
            <ebiz:UserId />
            <ebiz:Password />
         </ebiz:securityToken>
         <ebiz:customerToken>11480047</ebiz:customerToken>
         <ebiz:paymentMethodId>909</ebiz:paymentMethodId>
      </ebiz:SetDefaultCustomerPaymentMethodProfile>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SetDefaultCustomerPaymentMethodProfileResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <SetDefaultCustomerPaymentMethodProfileResult>true</SetDefaultCustomerPaymentMethodProfileResult>
      </SetDefaultCustomerPaymentMethodProfileResponse>
   </s:Body>
</s:Envelope>