Click to Pay
isEnrollmentAvailableForCardPrefix()
isEnrollmentAvailableForCardPrefix()
Use this function if your application collects the card details from the payer.
Once the payer has entered the card number, your application should call this function to determine if you can offer the payer to enroll the card in Click to Pay.
If the function returns true you must display the Click to Pay logo and terms and conditions.
Usage Copied to clipboard
ClickToPay.isEnrollmentAvailableForCardPrefix(tenDigitCardPrefix, callback);
Example Copied to clipboard
ClickToPay.isEnrollmentAvailableForCardPrefix('5123456789', function (canEnroll) { console.log('Card can be enrolled', canEnroll) });
Arguments Copied to clipboard
tenDigitCardPrefix
Copied to clipboard
String
REQUIRED
The first 10 digits of the card entered by the payer.
callback
Copied to clipboard
Function
REQUIRED
Callback function to return the response.
canEnroll
Copied to clipboard
Boolean
REQUIRED
Indicates if you can offer the payer to enroll the card in Click to Pay. If the value true is returned you can offer Click to Pay as a checkout option to the payer, otherwise you cannot.
Return Value Copied to clipboard
None