# react-vipps-payments

> Vipps payments es6 JavaScript and React NODE SDK for capture, refind,init payment

Latest version **0.1.0** (published 2020-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-vipps-payments
pnpm add react-vipps-payments
yarn add react-vipps-payments
bun add react-vipps-payments
```

## 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.0 |
| Published | 2020-08-30 |
| First published | 2020-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Martin Andersen |
| Maintainers | webmaeistro |
| Keywords | vipps, hurtigkasse, ecom, react |

## Links

- npm: https://www.npmjs.com/package/react-vipps-payments
- Repository: https://github.com/webmaeistro/react-vipps-payments
- Homepage: https://github.com/webmaeistro/react-vipps-payments#readme
- Issues: https://github.com/webmaeistro/react-vipps-payments/issues
- npm.io page: https://npm.io/package/react-vipps-payments

## Dependencies (8)

- [ow](https://npm.io/package/ow.md) ^0.17.0
- [axios](https://npm.io/package/axios.md) ^0.20.0
- [eslint](https://npm.io/package/eslint.md) ^7.1.0
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^11.1.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.20.2
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^4.2.1
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^14.1.1
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) ^4.0.1

## Recent versions

- 0.1.0 (latest) — 2020-08-30

## README

## Usage

### Initiate the client<br/>

```
const client = new VippsClient({
    id: VIPPS_CLIENT_ID",
    secret: "VIPPS_CLIENT_SECRET",
    subscriptionId: "VIPPS_SUB_KEY",
    testDrive: isProd ? false : true
});
```

### Initiate a payment<br/>

```
await client.initiatePayment({order:VippsCheckoutModel});
```

### Capture a payment<br/>

```
await client.capture({ orderId: VippsOrderId, body: VippsCaptureBodyModel });
```

### Refund a payment<br/>

```
await client.refund({ orderId: VippsOrderId, body: VippsRefundBodyModel });
```

### Get order payment details<br/>

```
await client.getOrderDetails({ orderId: VippsOrderId});
```

### Get an access token<br/>

```
await client.getAccessToken();
```

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