Click or drag to resize

LoyaltyClientValidateInStoreCard Method

Returns the Card Status for the submitted Card Number and Access Code.

Access Code may be configured to be an optional parameter.

Syntax
C#
public ResultOfstring ValidateInStoreCard(
	ManagementGroupRequestOfValidateInstoreCard request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfValidateInstoreCard

Return Value

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

  var validateInstoreCard = new LoyaltyService.ValidateInstoreCard();
  validateInstoreCard.CardNumber = "Card number"; //Required
  validateInstoreCard.AccessCode = "Access code"; //Required - May be optional depending on Program configuration

  //add validateInstoreCard to request
  request.Value = validateInstoreCard;

  LoyaltyService.ResultOfstring result = svc.ValidateInStoreCard(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
    //result.Value contains the CardStatus ('ACTIVE', 'INACTIVE', 'CLOSED' or 'PENDINGACTIVATION')
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also