@mia-burton/klarna-node
Version:
A Node.js module for Klarna
35 lines (24 loc) • 641 B
Markdown
A Node.js module for klarna api
```sh
npm install @mia-burton/klarna-node --save
yarn add @mia-burton/klarna-node
```
```typescript
import { Client } from '@mia-burton/klarna-node'
const client = new Client(uid, password).setLocation('America') // Location is onw of America, Europe, Oceania
//Create payment session
client.createPaymentSession(order, urls)
//Create order after the authorizathion on the client
client.createOrder(sessionId)
//Retrive the order
client.getOrder(orderId)
```
On inizialization set `live` parameter to false
```sh
npm run test
```