bongloy-react-native
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

bongloy-react-native

This is the Unofficial React Native library for Bongloy Payment Gateway API.

Installation

npm install bongloy-react-native --save
# or
yarn add bongloy-react-native

Usage

The package needs to be configured with your account's secret key, which is available in the Bongloy Dashboard. Require it with the key's value:

import bongloy from 'bongloy-react-native';

state = {
    params: {
      number: '6200000000000005',
      expMonth: 12,
      expYear: 24,
      cvc: '123',
    }
}

handlePayPress = async () => {
    try {
        bongloy.setDefaultPublishableKey({publishableKey: "pk_test_..."});
        const token = await bongloy.createToken(this.state.params)
        console.log(token);
    } catch (error) {
        console.log(error);
    }
}

Documentation

See the API docs.

Package Sidebar

Install

npm i bongloy-react-native

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

1.09 MB

Total Files

171

Last publish

Collaborators

  • sovonkhom