omise-react-native

0.1.0 • Public • Published

omise-react-native

==========

Please note that this is an unofficial Omise library for react-native. And please learn a security best practices from Omise's document before modifying code.

Install

$ npm install omise-react-native --save

Setup

To set Omise public key and API version

import Omise from 'omise-react-native';
Omise.config('pkey_test_596un7xggnyo73nm7an', '2015-11-17');

Usage

Create a token

const data = await Omise.createToken({
    'card': {
        'name': 'JOHN DOE',
        'city': 'Bangkok',
        'postal_code': 10320,
        'number': '4242424242424242',
        'expiration_month': 10,
        'expiration_year': 2018,
        'security_code': 123
    }
});

console.log("data", data);

Create a source

const data = await Omise.createSource(
    'type': 'internet_banking_bbl',
    'amount': 500000,
    'currency': 'thb'
});

console.log("data", data);

Package Sidebar

Install

npm i omise-react-native

Weekly Downloads

9

Version

0.1.0

License

ISC

Unpacked Size

54.3 kB

Total Files

15

Last publish

Collaborators

  • keeratita