Git Product home page Git Product logo

react-native-plug-pag-service's Introduction

react-native-plug-pag-service

Getting started

$ npm install react-native-plug-pag-service --save

Mostly automatic installation

$ react-native link react-native-plug-pag-service

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-plug-pag-service and add PlugPagService.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libPlugPagService.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.PlugPagServicePackage; to the imports at the top of the file
  • Add new PlugPagServicePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-plug-pag-service'
    project(':react-native-plug-pag-service').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-plug-pag-service/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-plug-pag-service')
    
  3. AndroidManifest.xml
  • Permissions To integrate the library with the PlugPagService library in Android applications you must add the following permission to AndroidManifest.xml.

    <uses-permission android:name="br.com.uol.pagseguro.permission.MANAGE_PAYMENTS"/>
    

    This permission allows the library to bind to PlugPagService , Moderninha Smart's embedded service , which manages all payment transactions.

  • Intent-filter In order for your app to be chosen as the default payment app and receive Card Insertion Intents, you need to add the following code to your AndroidManifest.xml within your main Activity.

    <intent-filter>
          <action android:name="br.com.uol.pagseguro.PAYMENT"/>
          <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
    

Usage

import PlugPagService, { PlugPag, PlugPagPaymentData, PlugPagActivationData } from 'react-native-plug-pag-service'

// TODO: What to do with the module?
PlugPagService;

react-native-plug-pag-service's People

Contributors

emrekayaoglu avatar

Stargazers

 avatar  avatar

Watchers

 avatar

react-native-plug-pag-service's Issues

after installation when running does not work

WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:processDebugResources'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.5.1.
Searched in the following locations:
- file:/Users/figueiredo/.m2/repository/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
- file:/Users/figueiredo/WebstormProjects/curso-react-native/moderninha/node_modules/react-native/android/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
- file:/Users/figueiredo/WebstormProjects/curso-react-native/moderninha/node_modules/jsc-android/dist/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
- https://dl.google.com/dl/android/maven2/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
- https://jcenter.bintray.com/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
- https://www.jitpack.io/br/com/uol/pagseguro/plugpagservice/wrapper/wrapper/1.5.1/wrapper-1.5.1.pom
Required by:
project :app > project :react-native-plug-pag-service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.