Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/line64/react-native-checkout-mercadopago
A react native bridge for MercadoPago checkout components
https://github.com/line64/react-native-checkout-mercadopago
android bridge ios mercadopago react-native
Last synced: 2 days ago
JSON representation
A react native bridge for MercadoPago checkout components
- Host: GitHub
- URL: https://github.com/line64/react-native-checkout-mercadopago
- Owner: line64
- License: mit
- Created: 2016-12-07T13:22:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T19:58:56.000Z (about 7 years ago)
- Last Synced: 2024-10-30T08:18:26.175Z (12 days ago)
- Topics: android, bridge, ios, mercadopago, react-native
- Language: Java
- Size: 728 KB
- Stars: 28
- Watchers: 9
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
React Native Checkout MercadoPago
=============
This package provides a bridge to trigger MercadoPago UI components (Android and iOS) from a react-native app. For more info about the native MercadoPago components, checkout the official documentation: [Android](http://mercadopago.github.io/px-android/) and [iOS](http://mercadopago.github.io/px-ios/)![example screencam](docs/example_screencam.gif)
## Setup
Install with npm: `npm install --save react-native-checkout-mercadopago`.
Or, install with yarn: `yarn add react-native-checkout-mercadopago`.
Either way, then link with `react-native link react-native-checkout-mercadopago`.
### iOS
1. Download MercadoPago´s [SDK for iOS](https://github.com/mercadopago/px-ios).
2. Open your project in XCode and drag MercadoPagoSDK.xcodeproj into the 'Libraries' folder of your app.
3. Navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.
4. In the 'General' panel, go to the 'Embedded Binaries' section.
5. Click on the '+' button and select 'MercadoPagoSDK.framework' under `Libraries > MercadoPagoSDK.xcodeproj > Products` from your project
## Usage```javascript
import { startCheckout } from 'react-native-checkout-mercadopago';//from your checkout button, start the checkout process like this:
let payment = await startCheckout('my_public_key', 'my_preference_id');
```
## ExampleCheck out the `/example` directory for a working demo of a react-native app triggering the MercadoPago components.