|
Call MatchCardHolder serviceTo match cards and card holders, you need to call MatchCardHolder supplying the card details, card holder personal details, and card holder address. Get validation responseTo find out whether the card passed validation, you need to retrieve the validation response. Are there any errors?If the card failed validation, card conditions are returned. Therefore to see if there were validation errors you need to check whether CardCondition contains any information.
![]() if (response.CardValidationResponse.CardConditions != null) If there are errors you need to extract the codes and any returned reasons to determine why the card details failed validation. Not every code has an associated reason.
![]() foreach(var CardCondition in response.CardValidationResponse.CardCondition) Console.WriteLine("Card validation failed with code: (0) Severity: (1) Reason: (2)") CardCondition.Code, CardCondition.Severity, CardCondition.Reason); Get overall resultTo find out whether there was a match between the card and card holder, you need to retrieve the overall result. Is the result Account Closed or Deceased?The match failed if the overall result is Account Closed or Deceased. Is the result Full?If the result is Full, the card and the holder matched. If the result is No match, either the card details or the personal details did not match, this will be shown in the more detailed results. If the result is Unable To Match, the match could not be performed or none of the personal details matched. Check the detailed results to determine whether it was the card or the personal details that could not be matched. If the overall result is Partial or Issuer, you need to check the detailed results to determine whether your business rules allow you to use these details. |
Get the Card Checking result, the personal details score and the address score to determine whether you should accept these details.
Check the detailed results against your business rules to determine whether these details are acceptable. For example, your business rules accepts a partial match where the personal details score is 5 or higher, but rejects a partial match if the personal details score is 4 or lower.
Your business requirements determine whether you display the overall result only or the overall result and the detailed results. Also if the validation was successful or the BIN exists, details about the card are returned. Your business requirements will determine which of these details you want to display.
if (response.MatchCardHolderResponse.OverallResult.HasValue)
Console.WriteLine("Overall Result => {0}", response.MatchCardHolderResponse.OverallResult.Value));
if (response.MatchCardHolderResponse.CardCheckResult.HasValue)
Console.WriteLine("Card checking result => {0}", response.MatchCardHolderResponse.CardCheckResult.Value));
Your application should interpret the validation results and display messages suitable for your users. For example, when code 4 is returned with no reason code, your application could display "The Card Number failed validation".