Closed maueli closed 3 years ago
@maueli have you logged the preferenceId
value that you're passing to the checkout? Maybe it's undefined.
I wonder if you could explain me how to set "server-side" react-native to run your example and get the "preferenceId".
Thanks!
The example has itself a README explaining the mandatory steps in order to run the application correctly. You can check it out here:
https://github.com/BlackBoxVision/react-native-mercadopago-px/tree/master/example
Also, we've a section of pre-requisites related to MP account setup:
https://github.com/BlackBoxVision/react-native-mercadopago-px#pre-requisites
Ok, I know I know. How can I get the preferenceid in a basic react-native App?. Do I have to install express to run the server-side? How/where can I run "curl" ?. Could you give me a clue or a basic example of how can I run server-side and get preferenceid easily? Thanksssss
In the example we go directly through MP Preference Creation API using the Access Token obtained from our account. That's a matter of simplicity in terms of the example.
If you want to add a server, you can check the sdk-nodejs repo: https://github.com/mercadopago/sdk-nodejs#-getting-started
I'll add a reference to the docs, but that's not related to our library setup.
I copy the example. Replace TestIDs and appear that:
"preferenceId is required for starting MP Checkout"