npm.io
0.3.3 • Published 3 years ago

@mia-burton/scalapay-js

Licence
MIT
Version
0.3.3
Deps
1
Size
53 kB
Vulns
23
Weekly
0
Stars
1

scalapay-js

A Node.js module for scalapay api

Installation

npm install @mia-burton/scalapay-js --save
yarn add @mia-burton/scalapay-js

Usage

Javascript
var scalaClient = require('@mia-burton/scalapay-js')
var client = new scalaClient(API_KEY)

//Create order
client.createOrder(orderDetail, 'your-confirmation-url', 'your-cancel-url')

//Capture payment
client.capture(token)

//Refund
client.refund(token ,refund)
TypeScript
import { ScalaClient } from '@mia-burton/scalapay-js'

const client = new ScalaClient(API_KEY)

//Create order
client.createOrder(orderDetail, 'your-confirmation-url', 'your-cancel-url')

//Capture payment
client.capture(token)

//Refund
client.refund(token ,refund)

Enable sandbox env

On inizialization set sandbox parameter to true

Test

npm run test

Keywords