Introduction
Authentication
Batch
Browser Payment
Gateway
Hosted Checkout
Payment Plan
Session
Standalone Risk Assessment
Tokenization
Transaction
Wallet
RESOURCES
Changelog
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
ClickToPay.isEnrollmentAvailableForCardPrefix(tenDigitCardPrefix, callback);
Example
ClickToPay.isEnrollmentAvailableForCardPrefix('5123456789', function (canEnroll) { console.log('Card can be enrolled', canEnroll) });
Arguments
tenDigitCardPrefix
String
REQUIRED
The first 10 digits of the card entered by the payer.
callback
Function
REQUIRED
Callback function to return the response.
canEnroll
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
None