Skip to content

How can we fill createCardToken method parameters using SecureFields? #100

Closed Answered by icaldana
ihojmanb asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ihojmanb 😸
Secure Fields use iFrames to do not expose PCI data such as cardNumber, expirationDate and securityCode, so you do not need to worry about it on mp.fields.createCardToken method. This is actually the reason for the iframes to exist. About you getting undefined, please make sure the page is loading properly, I’ve tested on a local example, and I was able to get the data from document.getElementById('form-checkout__cardholderName').value

Please take a look at https://github.com/mercadopago/sdk-js/blob/main/API/fields.md#mp-instancefieldscreatecardtokennonpcidata

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@icaldana
Comment options

@ihojmanb
Comment options

@icaldana
Comment options

@icaldana
Comment options

@ihojmanb
Comment options

Answer selected by ihojmanb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants