@mia-burton/klarna-node
v1.0.4
Published
A Node.js module for Klarna
Downloads
44
Keywords
Readme
klarna-node
A Node.js module for klarna api
Installation
npm install @mia-burton/klarna-node --save
yarn add @mia-burton/klarna-node
Usage
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)
Enable sandbox env
On inizialization set live
parameter to false
Test
npm run test