Click or drag to resize

LoyaltyClientReplaceCard Method

Sets the specified Card Number Status to "INACTIVE". This will prevent any possible unauthorised Points Redemptions occuring.

A new replacement Card is generated. The details associated to the specified Card Number will copied to the replacement Card.

The service returns the replacement Card Number and Access Code.

Syntax
C#
public ResultOfCardCredentials ReplaceCard(
	ManagementGroupRequestOfstring request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfstring

Return Value

Type: ResultOfCardCredentials
Examples
C#
using (var svc = new LoyaltyService.LoyaltyClient())
{
  var request = new LoyaltyService.ManagementGroupRequestOfstring();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin
  request.Value = "21000005"; //Required - card number

  LoyaltyService.ResultOfCardCredentials result = svc.ReplaceCard(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded.
    //result.Value.CardNumber - New Card Number.
    //result.Value.AccessCode - New Access Code.
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also