Session
onFocus
onFocus Callback
The onFocus( ) callback invokes the function registered against this event when the hosted field in the iFrame has gained focus.
Usage Copied to clipboard
PaymentSession.onFocus([HostedFieldsRole], function(selector, role), [scope]);
Example Copied to clipboard
PaymentSession.onFocus(['card.number', 'card.securityCode'], function(selector, role) { //handle focus event });
Arguments Copied to clipboard
HostedFieldsRole
Copied to clipboard
Array
An array of field roles for the hosted fields where the event occurred. Valid array of field roles:
card.nameOnCard
card.number
card.expiryMonth
card.expiryYear
card.securityCode
giftCard.number
giftCard.pin
ach.bankAccountNumber
ach.bankAccountNumberConfirmation
ach.bankAccountHolder
ach.routingNumber
callbackFunction
Copied to clipboard
Function
The callback function invoked with the selector and the role for the field whose proxy triggered the event. Valid array of field roles:
number
nameOnCard
expiryMonth
expiryYear
securityCode
pin
bankAccountNumber
bankAccountNumberConfirmation
bankAccountHolder
routingNumber
scope
Copied to clipboard
String
The optional named instance of a card payment data set within a session. See Multiple Hosted Sessions for more information.
Return Value Copied to clipboard
None