0.10.1 • Published 2 years ago

react-native-magnati-pos v0.10.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-magnati-pos

All POS functions integrated in library ready to use

Installation

npm install react-native-magnati-pos

Usage

Do make sure the application has Bluetooth connect permission, to setup add below permission in AndroidManifest.xml

<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

To trigger initialize function of POS call initializePOS as given in below example

import { initializePOS } from 'react-native-magnati-pos';

// ...

const result = await  initializePOS({
      transactionTimeout: 120,
      uuid: 'xxxxx-xxxxx-xxxxxx-xxxxx',
      connectionTimeout: 30,
      settlementTimeout: 300,
      enableTrace: false,
    });

To Start transaction mode of POS call startTransactionMode as given in below example

import { startTransactionMode } from 'react-native-magnati-pos';

// ...

const result = await  startTransactionMode();

To trigger payment auth function of POS call initializePayment as given in below example

import { initializePayment } from 'react-native-magnati-pos';

// ...

const result = await  initializePayment(transactionAmount:number,TID:number, ecrn:number)

While calling above function do keep in mind below details:

  • The transaction amount is with assumed decimals. Example: 100 will be taken as DHS 1.00
  • TID is the terminal id of pos
  • ecrn is a Transaction number for a particular batch.

To Stop transaction mode of POS call stopTransactionMode as given in below example

import { stopTransactionMode } from 'react-native-magnati-pos';

// ...

const result = await  stopTransactionMode();

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.10.1

2 years ago

0.10.0

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago

0.8.4

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago