# react-native-adyen-api

> This library helps easily call API to Adyen terminal to make a payment

Latest version **1.0.2** (published 2023-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-adyen-api
pnpm add react-native-adyen-api
yarn add react-native-adyen-api
bun add react-native-adyen-api
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-03-29 |
| First published | 2023-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hoatenhu |
| Maintainers | hoatenhu |
| Keywords | adyen, adyen terminal, adyen local, adyen api, adyen local terminal, adyen local api, adyen terminal api |

## Links

- npm: https://www.npmjs.com/package/react-native-adyen-api
- Repository: https://github.com/hoatenhu/react-native-adyen-api
- Homepage: https://github.com/hoatenhu/react-native-adyen-api#readme
- Issues: https://github.com/hoatenhu/react-native-adyen-api/issues
- npm.io page: https://npm.io/package/react-native-adyen-api

## Dependencies (3)

- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [rn-fetch-blob](https://npm.io/package/rn-fetch-blob.md) ^0.12.0
- [react-native-quick-crypto](https://npm.io/package/react-native-quick-crypto.md) ^0.5.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-03-29
- 1.0.1 — 2023-03-29
- 1.0.0 — 2023-03-29

## README

# ⚡️ react-native-adyen-api

An easy way to call the make a payment api to the Adyen terminal when you use react-native.


---

## Installation


```sh
npm install --save react-native-adyen-api

```

```sh
yarn add react-native-adyen-api

```

## Important: Replace `crypto-browserify`

Because this library uses react-native-quick-crypto you may need an extra step:

If you are using a library that depends on `crypto`, instead of polyfilling it with `crypto-browserify` (or `react-native-crypto`) you can use `react-native-quick-crypto` for a fully native implementation. This way you can get much faster crypto operations with just a single-line change!

In your `babel.config.js`, add a module resolver to replace `crypto` with `react-native-quick-crypto`:

```diff
module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
+   [
+     'module-resolver',
+     {
+       alias: {
+         'crypto': 'react-native-quick-crypto',
+         'stream': 'stream-browserify',
+         'buffer': '@craftzdog/react-native-buffer',
+       },
+     },
+   ],
    ...
  ],
};
```

Then restart your bundler using `yarn start --reset-cache`.

Now, all imports for `crypto` will be resolved as `react-native-quick-crypto` instead.

> 💡 Since react-native-quick-crypto depends on `stream` and `buffer`, we can resolve those to `stream-browserify` and @craftzdog's `react-native-buffer` (which is faster than `buffer` because it uses JSI for base64 encoding and decoding).

## Usage

For example, you just need to create an object containing the config information of the adyen terminal:

```js
const config = 
{
  amount: 100,
  saleId: "618ca3fc-5272-4184-a1c2",
  terminalIp: "192.168.1.19",
  poiid: "S1F2-000158212621330",
  securityId: '1',
  passphrare: '1',
  securityVersion: 1,
  currency: "SGD",
}

const response = await makeLocalPayment(config)
```

---


## License

MIT

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