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

react-native-ezetap-sdk

v1.2.1

Published

`$ npm i react-native-ezetap-sdk`

Downloads

115

Readme

Getting started

$ npm i react-native-ezetap-sdk

Manual installation

Android

  1. Open node_modules Add [email protected] folder
  2. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.ezetapsdk.RNEzetapSdkPackage; to the imports at the top of the file
  • Add new RNEzetapSdkPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-ezetap-sdk'
    project(':react-native-ezetap-sdk').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ezetap-sdk/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-ezetap-sdk')

After manual or automatic installation

Open up android/app/src/main/AndroidManifest.xml

  • Add tools:replace="android:allowBackup" in application tag
     <application
        android:name=".MainApplication"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/AppTheme"
        tools:replace="android:allowBackup">

What you need

  1. React Native development environment
  2. Android phone that can connect to internet
  3. This documentation
  4. Ezetap app key or login credentials to Ezetap service
  5. Ezetap device to test card payments

Usage

import RNEzetapSdk from 'react-native-ezetap-sdk';

Methods

      var json = {
      "prodAppKey": "Your prod app key",
      "demoAppKey": "Your demo app key",
      "merchantName": "merchantName",
      "userName": "userName",
      "currencyCode": 'INR',
      "appMode": "Your environment",
      "captureSignature": 'true',
      "prepareDevice": 'false',
      "captureReceipt": 'false'
    };
    var response = await RNEzetapSdk.initialize(JSON.stringify(json));
    console.log(response);
    var response = await RNEzetapSdk.prepareDevice();
    console.log(response);
    var sendReceiptJson = {
        "customerName": "customerName",
        "mobileNo": "mobileNo",
        "email": "emailId",
        "txnId": "transactionID"
      };
      
    var response = await RNEzetapSdk.sendReceipt(JSON.stringify(sendReceiptJson));
    console.log(response);
      var json = {
        "issueType": "issueType",
        "issueInfo": "issueInfo",
        "tags": [
          "tag1","tag2"
        ]
      };
  
    var response = await RNEzetapSdk.serviceRequest(JSON.stringify(json));
   console.log(response);
      var json = {
        "agentName": "username",
        "saveLocally": false
      };
  
    var response = await RNEzetapSdk.searchTransaction(JSON.stringify(json));
   console.log(response);
     var json = {
        "amount": "100",
        "options": {
          "amountTip": 0.0,
          "references": {
            "reference1": "sffr",
            "additionalReferences": [
      
            ]
          },
          "customer": {
      
          },
          "serviceFee": -1.0,
          "addlData": {
            "addl1": "addl1",
            "addl2": "addl2",
            "addl3": "addl3"
          },
          "appData": {
            "app1": "app1",
            "app2": "app2",
            "app3": "app3"
          }
        }
      };
  
    var response = await RNEzetapSdk.getTransaction(JSON.stringify(json));
   console.log(response);
     var json = {};
    var response = await RNEzetapSdk.checkForIncompleteTransaction(JSON.stringify(json));
   console.log(response);
    //Pass the transactionId to this function
    var transactionID = "";
    var response = await RNEzetapSdk.voidTransaction(transactionID);
   console.log(response);
    var json = {"txnId": "transactionID"};
    var response = await RNEzetapSdk.attachSignature(JSON.stringify(json));
   console.log(response);
  var json = {
    "amount": "123",
    "options": {
      "serviceFee": 100,
      "paymentBy": "CREDIT OR DEBIT OR ANY (**To be used only if the service fee is being added.)",
      "paymentMode": "Card/Cash/Cheque/UPI/UPI_VOUCHER/RemotePay/BHARATQR/Brand_Offers/Brand_EMI/Normal_EMI/Wallet ",
      "providerName": "<NBFC> eg. ZestMoney. (**providerName and emiType are to be passed only if user wants to use ZestMoney. In this scenario, set \"paymentMode”:”EMI”)",
      "emiType": "NORMAL, BRAND, EMI",
      "references": {
        "reference1": "1234",
        "additionalReferences": [
          "addRef_xx1",
          "addRef_xx2"
        ]
      },
      "appData": {
        "walletAcquirer": "freecharge/ola_money/ etc.(**walletAcquirer are to be passed only if user sets \"paymentMode”:”Wallet”)"
      },
      "customer": {
        "name": "xyz",
        "mobileNo": "1234567890",
        "email": "[email protected]"
      }
    }
  };
  
   var response = await RNEzetapSdk.pay(JSON.stringify(json));
   console.log(response);
    //Pass the transactionId to this function
    var transactionID = "";
    var response = await RNEzetapSdk.printReceipt(transactionID);
     console.log(response);
    //Pass the image as base64 string to this function
    var base64ImageString = "";
    var response = await RNEzetapSdk.printBitmap(base64ImageString);
   console.log(response);
    var response = await RNEzetapSdk.logout();
   console.log(response);
    var json = {"txnIds":[""]};
    var response = await RNEzetapSdk.stopPayment(JSON.stringify(json));
   console.log(response);
    var response = await RNEzetapSdk.scanBarcode();
   console.log(response);
     var json = {
       "amount": "100",
       "txnId": "transactionID"
     };
    var response = await RNEzetapSdk.refundTransaction(JSON.stringify(json));
     console.log(response);
    var response = await RNEzetapSdk.checkForUpdates();
    console.log(response);