# react-native-plug-pag-service

> React Native Plug Pag Service Plugin

Latest version **0.1.17** (published 2019-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-plug-pag-service
pnpm add react-native-plug-pag-service
yarn add react-native-plug-pag-service
bun add react-native-plug-pag-service
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.17 |
| Published | 2019-12-15 |
| First published | 2019-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Emre Kayaoglu |
| Maintainers | emrekayaoglu |
| Keywords | react-native, plugpag, plugin |

## Links

- npm: https://www.npmjs.com/package/react-native-plug-pag-service
- Repository: https://github.com/EmreKayaoglu/React-Native-Plug-Pag-Service
- Homepage: https://github.com/EmreKayaoglu/React-Native-Plug-Pag-Service#readme
- Issues: https://github.com/EmreKayaoglu/React-Native-Plug-Pag-Service/issues
- npm.io page: https://npm.io/package/react-native-plug-pag-service

## Recent versions

- 0.1.17 (latest) — 2019-12-15
- 0.1.16 — 2019-12-15
- 0.1.15 — 2019-12-15
- 0.1.14 — 2019-12-14
- 0.1.13 — 2019-12-14
- 0.1.12 — 2019-12-14
- 0.1.11 — 2019-12-06
- 0.1.10 — 2019-12-06
- 0.1.9 — 2019-12-06
- 0.1.8 — 2019-12-05
- 0.1.7 — 2019-12-04
- 0.1.6 — 2019-12-04
- 0.1.5 — 2019-12-04
- 0.1.4 — 2019-12-03
- 0.1.3 — 2019-12-03
- … 3 more at https://npm.io/package/react-native-plug-pag-service/versions

## README

# 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 `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-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 Phases` ➜ `Link 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
2. 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')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-plug-pag-service')
  	```
4. 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
```javascript
import PlugPagService, { PlugPag, PlugPagPaymentData, PlugPagActivationData } from 'react-native-plug-pag-service'

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

---
_Source: https://npm.io/package/react-native-plug-pag-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
