How and why I built MercadoPago for React Native
About me
Full Stack Developer. Focused on Web, Mobile, Gaming and Cloud Technologies. #JS #Phaser #Hybrid #Ionic #ReactNative #NativeScript #NodeJS #Azure #NET #dotnet
The problem I wanted to solve
Integrate the mobile checkout of MercadoPago v4 with React Native using NativeModules to create the bridge to call native code
What is MercadoPago for React Native?
With MercadoPago for React Native you can call the Native code of each platform using promises with JavaScript
Tech stack
React Native, Java, Objective C and JS
The process of building MercadoPago for React Native
- Integrate the SDK for Android
- Create the module and package to have a startPayment method to send the publicKey, preferenceId and some options
- Do the same process for iOS and fix the configuration with pods
Challenges I faced
Fixing issues with Swift using pods from iOS
Key learnings
I learn the process creating Bridges for React Native and Cordova, learning more about Native code and how to have a correct configuration creating libraries and plugins for these mobile frameworks
Tips and advice
- Present a custom viewcontroller is a good option to show the different screens of the SDK
- Check the limitations of the sdk to validate the different options you can have for your plugins
Final thoughts and next steps
I want to continue improving the library to use for other paid projects