npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blackbox-vision/react-native-mercadopago-tokenize-checkout

v0.2.4

Published

MercadoPago Web Tokenize Checkout for React Native

Downloads

4

Readme

MercadoPago Tokenize Checkout RN License: MIT

A component to integrate MercadoPago tokenize checkout into a RN app.

Why this exists?

Currently, MercadoPago native SDKs doesn't support card tokenization and card save/restore from user.

Table of contents

Use case

You're using RN for building an app, and you need to integrate MercadoPago checkout in your app.

Compatibility

Our package currently supports apps with RN >= 0.60. We don't have a plan currently to support olders ones, but if you need we're open to support it.

Pre Requisites

As a pre requisite you'll need the following before integrating the library:

  1. A MercadoPago Account
  2. A publicKey from your MercadoPago Account

If you don't have any of the followings, you can start from here:

  1. Creating a MercadoPago Account
  2. Creating a MercadoPago Application

If you've more doubts you can read more documentation in this portal:

Installation

You can install this library via NPM or YARN.

NPM

npm i @blackbox-vision/react-native-mercadopago-tokenize-checkout

YARN

yarn add @blackbox-vision/react-native-mercadopago-tokenize-checkout

Example Usage

After reading and performing the previous steps, you should be able to import the library and use it like in this example:

import Env from 'react-native-config';
import React, { useState } from 'react';
import { StyleSheet, View, Text, TouchableOpacity, Alert } from 'react-native';

import MercadoPagoWebTokenizeCheckout from '@blackbox-vision/react-native-mercadopago-tokenize-checkout';

import styles from './styles';

export default function App() {
  return (
    <MercadoPagoWebTokenizeCheckout
      amount="100.00"
      action="yourServerUrl"
      productLabel="Awesome Product"
      publicKey={Env.PUBLIC_KEY}
      style={styles.container}
      theme={{
        elements: '#000',
        header: '#000',
      }}
    />
  );
}

Realistic Example

We provide a more real sample app here.

Example App Running

Props

The MercadoPago WebTokenize Checkout component support the following props:

| Properties | Types | Default Value | Description | | --------------- | -------- | ------------- | ---------------------------------------------- | | amount | number | none | The amount to pay for the product | | action | string | none | The action where the data will be sent | | publicKey | string | none | The Public Key for MP | | keepOpen | boolean | none | Flag to restore the payment state if failure | | cardsIds | string[] | none | The cards associated to the customer | | customerId | string | none | The ID for the customer | | theme | object | none | The theme for the checkout | | productLabel | string | none | The label for the product | | discountLabel | string | none | The theme for the checkout | | maxInstallments | number | none | The label for the discount | | discount | number | none | The amount for the discount | | shipping | number | none | The amount for the shipping | | charge | number | none | The amount for the additional charge | | taxes | number | none | The amount for the taxes | | arrears | number | none | The amount for the arrears | | style | object | none | The additional styles to customize the WebView |

The theme has the following props:

| Properties | Types | Default Value | Description | | ---------- | ------ | ------------- | -------------------------------------- | | elements | string | none | Hexadecimal color for all the elements | | header | string | none | Hexadecimal color for the header |

Issues

Please, open an issue following one of the issues templates. We will do our best to fix them.

Contributing

If you want to contribute to this project see contributing for more information.

License

Distributed under the MIT license. See LICENSE for more information.