@mia-burton/scalapay-js
v0.3.3
Published
A Node.js module for Scalapay
Downloads
33
Keywords
Readme
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