createCardToken "Invalid primary field found" #135
-
Hello, we are migrating the client from version v1 to v2, we already have mercadopago working on the server and client, we use our own checkout with custom inputs, so we only need the core methods so my problem is that in v2 I don't know why I can't use the createCardToken function since it does not specify requirements to be able to use it and i get this error "No primary field found. Please create and mount on…efore calling 'createCardToken'. Ignoring call...", and also if it is okay that getIdentificationTypes does not return any type of identity document ( for Mexico ). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, how are you? About createCardToken function:Instead of your current custom inputs for the following fields: expirationDate, cardNumber and securityCode, you should put three divs:
After, you need to put the following code:
The methods above will insert the input component on the divs that you created before. About getIdentificationTypes:Now this function returns a promise, so, you need to resolve it, on the devsite example, we make it in the following way:
Reference |
Beta Was this translation helpful? Give feedback.
Hello, how are you?
About createCardToken function:
Instead of your current custom inputs for the following fields: expirationDate, cardNumber and securityCode, you should put three divs:
After, you need to put the following code:
The method…