E-Payment Integrator 2020 C++ Edition

Questions / Feedback?

ValidateCard Method

Checks the card number and expiration date for validity.

Syntax

ANSI (Cross Platform)
int ValidateCard();

Unicode (Windows)
INT ValidateCard();
- (void)validateCard;
#define MID_CARDVALIDATOR_VALIDATECARD 4

INPAY_EXTERNAL int INPAY_CALL InPay_CardValidator_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method performs several checks on customer information to determine if the card information submitted could be valid. This should be done before submitting an actual transaction for authorization. The tests performed are listed below:

Luhn Digit CheckThis process checks the digits of the CardNumber to make sure that it could be a valid card number. The mathematical algorithm used to determine validity is outlined in the Visa External Interface Specification: Authorization Record Formats Version 5.8, page 63.
Card Type CheckThis process checks the length and the beginning digits of the CardNumber to determine if it is a valid card type. The results of this check is stored are the CardType and CardTypeDescription properties.
Expiration Date CheckThe date given in CardExpMonth and CardExpYear is compared to the current system date to make sure that the card is still valid.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 /n software inc. - All rights reserved.
E-Payment Integrator 2020 C++ Edition - Version 20.0 [Build 7941]