1.0.0 • Published 4 months ago

react-native-allinone-upi v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

react-native-allinone-upi

UPI Payment using installed UPI Payment Apps in Mobile. Currently, supported only on Android.

Installation

npm install react-native-allinone-upi

Usage

import { initiateTransaction } from 'react-native-allinone-upi';

// ...

initiateTransaction({
  upi: 'upi_id', // Required
  transactionId: 'transaction_id', // Required
  currency: 'INR', // Currency Code (Required)
  merchantCategoryCode: 'Merchant Category Code', // Four digit Code. (Required)
  payeeName: 'Name of the Payee', // Required
  amount: '1', // Amount must be in String and must be greater than 1.00 (Required)
  note: 'test', // Additional Notes or description (Optional)
})
  .then((res) => {
    console.log(res, 'RESPONSE');
  })
  .catch((e) => {
    console.log(e.message, 'ERROR');
  });

Response Props

KeyValueDescription
paymentStatus-1 or 1 or 0-1 - DATA MISSING OR INVALID, 1 - SUCCESS, 0 - FAILURE
txnIdStringTransaction ID return from the Payment App ( for Backend Process ) only return when the paymentStatus is 1 or 0
txnRefStringTransaction Reference ID return from the Payment App ( only return when the paymentStatus is 1 or 0 )
missingDataMissing DataData which is missing or Invalid ( only return when the paymentStatus is -1 )
responseCodeStringCode return from the Payment App ( only return when the paymentStatus is 1 or 0 )
messageStringMessage about Success or Failure or Invalid Data

Missing Data

AMOUNT, UPI_ID, TRANSACTION_ID, CURRENCY, MERCHANT_CATEGORY_CODE, PAYEE_NAME

Contributing

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

License

MIT

Would you like to support me?

1.0.0

4 months ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago