Displaying Card Brand Logos in iFrame
While the Spreedly Express app natively displays the card brand logo as the card number is being entered, the iFrame does not.
However, the iFrame allows much more in terms of customization and adding this functionality is relatively simple.
For iFrame, you can use the eventHandler for `input` and check the `inputProperties` for `cardType`. You'd have to add the logos and the code to display them. The cardType should be recognized once the first 6 digits have been entered.
https://docs.spreedly.com/reference/iframe/v1/#fieldevent
Express currently displays card brand logos for Visa, Mastercard, Discover, and American Express. Using the iFrame will allow you to build logic to recognize additional card types as well. A full list of card types supported by Spreedly can be found here.
Please sign in to leave a comment.
Comments
0 comments