Socket
Book a DemoInstallSign in
Socket

react-native-ingenico

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ingenico

## Getting started

1.0.9
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-native-ingenico

Getting started

$ npm install react-native-ingenico --save

Mostly automatic installation

$ react-native link react-native-ingenico

Manual installation

Android

  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNIngenicoPackage; to the imports at the top of the file
  • Add new RNIngenicoPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ':react-native-ingenico'
    project(':react-native-ingenico').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ingenico/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-ingenico')
    

Usage


import Ingenico from 'react-native-ingenico';

const startPayment = async() => {
  try {
    const res = await Ingenico.startPayment("10,50", "GP122345")
  } catch(e) {
    console.log('ERROR:', e)
  }
}

const startTTL = async() => {
  try {
    const res = await Ingenico.startTTL("10,50", "GP122345")
  } catch(e) {
    console.log('ERROR:', e)
  }
}

const startRefund = async() => {
  try {
    const res = await Ingenico.startRefund()
  } catch(e) {
    console.log('ERROR:', e)
  }
}

const startCNS = async() => {
  try {
    const res = await Ingenico.startCNS()
  } catch(e) {
    console.log('ERROR:', e)
  }
}


In case of right answer POS returns something like:

{
	acquirerId: "88105000001"
	additionalData: ""
	amount: "10.5"
	authorizationNumber: null
	cvm: "1"
	date: "3007191822"
	exp: "****"
	merchantId: "309109500006   "
	operationNumber: "000046"
	pan: "524490*******0178"
	stan: "000025"
	status: 0
	termId: "50000003"
}

Keywords

react-native

FAQs

Package last updated on 15 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.