Introduction
Agreement
Authentication
Batch
Browser Payment
Gateway
Hosted Checkout
Payment Plan
Session
Standalone Risk Assessment
Tokenization
Transaction
Wallet
RESOURCES
Changelog
Session
setPlaceholderShownStyle()
setPlaceholderShownStyle()
Sets the styling for the hosted field to the supplied styling attributes when placeholder text on the hosted field is visible.
This function supports the Multiple Hosted Session functionality.
Usage
PaymentSession.setPlaceholderShownStyle([HostedFieldsRole], styles, scope)
Example
PaymentSession.setPlaceholderShownStyle(["card.number", "card.nameOnCard"], { backgroundColor: 'orange', border: '1px solid blue' });
Arguments
HostedFieldRole
String
REQUIRED
The field role for the card field rendered in an iFrame and hosted on the Mastercard Gateway. Valid
field
roles:
card.nameOnCard
card.number
card.expiryMonth
card.expiryYear
card.securityCode
giftCard.number
giftCard.pin
ach.bankAccountNumber
ach.bankAccountNumberConfirmation
ach.bankAccountHolder
ach.routingNumber
directDebitCanada.bankAccountHolder
directDebitCanada.bankAccountNumber
directDebitCanada.financialInstitutionNumber
directDebitCanada.bankAccountNumberConfirmation
directDebitCanada.transitNumber
styles
Object
An object containing JavaScript CSS properties.
scope
String
The optional named instance of a card payment data set within a session. See Multiple Hosted Sessions for more information.
Return Value
None