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-instantpay-mpos

v1.0.13

Published

An mPOS (mobile point-of-sale) is a smartphone, tablet or dedicated wireless device that performs the functions of a cash register or electronic point-of-sale terminal (POS terminal) wirelessly.

Downloads

20

Readme

react-native-instantpay-mpos

mPOS for React Native and support only for android.

TOC

Installation

Using npm:

npm install --save react-native-instantpay-mpos

or using yarn:

yarn add react-native-instantpay-mpos

Android Dependencies

Importing SDK to your Android Application

Add this in your root build.gradle at the end of repositories in allprojects section:

allprojects { 
    repositories { 
        maven { 
            credentials { 
                username 'myMavenRepo' 
                password 'CredoPaySDK' 
            } 
            url "https://mymavenrepo.com/repo/FrQdp1FhEvW3jjbX8Md4/" 
        }
        maven { url "https://jitpack.io" } 
    } 
}

Then reference the library in the dependency section:

dependencies { 
    implementation 'in.credopay.payment.sdk:vm30-payment-sdk:3.0.12' 
}

The SDK internally depends on the following libraries

com.squareup.okhttp3:okhttp:3.12.1
com.squareup.retrofit2:retrofit:2.4.0
com.squareup.retrofit2:converter-gson:2.4.0

If your app conflicts with above dependencies, then you could exclude the library from the SDK and then can be implemented externally.

dependencies {
    implementation ('in.credopay.payment.sdk:vm30-payment-sdk:3.0.12')  
    {
        exclude module:'retrofit' 
    }
} 

Usage

Supported method list :

  1. disconnectDevice
  2. startTransaction

import { disconnectDevice, startTransaction } from 'react-native-instantpay-mpos';


//case

let options = {
    transactionType : 'PURCHASE',
    debugMode : true,
    amount : 1,
    ...
}

startTransaction(JSON.stringify(options)).then(res => {
    console.log(res);
}); 

Note about startTransaction Method

Possible options values :

| key | Description | type | required | | --------------- | -------------------------------------------------- | ---------- | -------------- | | transactionType | Transaction Type | string | Mandatory | | debugMode | Debug Mode | boolean | Optional | | production | Enable for Production | boolean | Mandatory | | amount | Amount | int | Optional | | loginId | Login Id for login | string | Mandatory | | loginPassword | Login password for login | string | Mandatory | | mobile | mobile for sending SMS | string | Mandatory | | customerRefNo | uniques for every trans. | string | Optional | | successTimeout | Success dismiss timeout (2 sec default) | int | Optional | | optional1 | Optional value | string | Optional | | optional2 | Optional value | string | Optional | | optional3 | Optional value | string | Optional | | optional4 | Optional value | string | Optional | | optional5 | Optional value | string | Optional | | optional6 | Optional value | string | Optional | | optional7 | Optional value | string | Optional | | optional8 | Optional value | string | Optional | | optional9 | Optional value | string | Optional | | optional10 | Optional value | string | Optional | | isLogo | set logo in drawable folder with name mposlogo | boolean | Optional |


Note :

  1. Transaction Type possibel values : "PURCHASE", "MICROATM", "BALANCE_ENQUIRY", "UPI"
  2. Acceptable file formate for logo : png,jpg,jpeg
  3. use disconnectDevice method after every transactions.

Theming

Colours can be overridden in colors.xml for your app.

<?xml version="1.0" encoding="utf-8"?> 
<resources>
    <color name="credopayColorPrimary">#3E6698</color>
    <color name="credopayColorPrimaryDark">#264367</color>  
    <color name="credopayColorSecondary">#33B900</color>  
    <color name="credopayColorAccent">#D81B60</color>
    <color name="credopayColorRed">#FE4242</color>
    <color name="credopayColorWhite">#ffffff</color>
    <color name="credopayColorBlack">#000000</color>
    <color name="credopayColorBottomNavIconUnSelected">#B1B1B1</color>  
    <color name="credopayColorLight">#f5f5f5</color>
</resources>

Proguard

If you have enabled “minify”, you will need to add this config to your Proguard config

#-keep class in.credopay.**{
#   <fields>;
#   public <methods>;
#}
#-keepclassmembers class in.credopay.** { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiRequest {  <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiResponse {  <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiRequest$IsoData { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiResponse$IsoData { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiResponse$IsoData { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiErrorResponse { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.TransactionModel { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.TransactionResponse { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.UpiStatusResponse { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.ApiResponse$TransactionSets { <fields>; }
-keepclassmembers class in.credopay.payment.sdk.TransactionAggregateResponse { <fields>; }

-assumenosideeffects class android.util.Log {
    public static boolean isLoggable(java.lang.String, int);
    public static int d(...);
    public static int w(...);
    public static int v(...);
    public static int i(...);
    public static int e(...);
}
-assumenosideeffects class timber.log.Timber* {
    public static * d(...);
    public static * w(...);
    public static * v(...);
    public static * i(...);
    public static * e(...);
} 

License

MIT


Made with Instantpay