scalapay

1.0.3 • Public • Published

ScalaPay Merchant NPM

NPM Version

Table of Contents

Install

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.6 or higher is required.

Installation is done using the npm install command:

$ npm i scalapay

Introduction

This is a node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.

Here is an example on how to use it:

var scalapay  = require('scalapay');
var scala     = scalapay.login({
  token : 'MERCHANT_TOKEN'
});
 
scala.testAccess(function(error, result) {
    if(error){
        console.log(error);
    else
        console.log(result);
});

Recommendation

Create a config file named /config/ScalaAPI.js

var scalapay = require('scalapay');
 
var Scala = scalapay.login({ 
  token: "MERCHANT_TOKEN" 
});
 
module.exports = Scala;

now you can use it in your other js files

const scala = require('./config/ScalaAPI');
 
scala.testAccess(function(error, result) {
    if(error){
        console.log(error);
    else
        console.log(result);
});
 
scala.generateAddress(function(error, result) {
    if(error){
        console.log(error);
    else
        console.log(result);
});
 
scala.transfer("philip119@gmx.de","1337", function(error, result) {
    if(error){
        console.log(error);
    else
        console.log(result);
});

Readme

Keywords

Package Sidebar

Install

npm i scalapay

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

6.24 kB

Total Files

7

Last publish

Collaborators

  • snwzy