0.4.1 • Published 4 years ago

elp-api v0.4.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

elp-api

PayPal Ask me anything Version Downloads Get help on Codementor

ELP API wrapper for Node.js

:cloud: Installation

# Using npm
npm install --save elp-api

:clipboard: Example

"use strict";

const ELP = require("../lib");

var client = new ELP({
    username: process.env.ELP_USERNAME || 'your username'
  , password: process.env.ELP_PASSWORD || 'your password'
  , endpoint: process.env.ELP_ENDPOINT || "your host"
});


let corpId = 'your corp id'
let key = 'your key'
let branchId = 'your branch id'
let tranDate = Date.now()+'';

var body = {
  corporateID: corpId,
  branchID: branchId,
  transactionKey: client.getTransactionKey(corpId,branchId,key,tranDate),
  requestRefNo: tranDate,
  planCode: 'PLANCODE',
  transactionType: 'RTL2SUB',
  targetSubsAccount: '09181111111',
  merchSenderNameFlag: false,
  merchantCrossSell: 'Company Name',
  requestTimestamp: tranDate,
  terminalID: 'Terminal 1',
  address: 'Location 1',
  zipCode: '0000',
  unitCredit: 5,
  amountDeduct: 0,
  transactionRRN: ''
}

client.retailerToSusbcriber( body, (err, res) => {
  console.log(err || res);
});

:question: Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. :bug:

  3. For direct and quick help, you can use Codementor. :rocket:

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

:sparkling_heart: Support my projects

I do web services and open-source my used projects as much as I can. I will try to reply to everyone needing help using these projects. It consumes a lot of time and hardwork. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • PayPal—You can make one-time donations via PayPal. I'll probably buy a coffee tea. :tea:
  • Support me on Patreon—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
  • Bitcoin—You can send me bitcoins at this address (or scanning the code below): 344FWmvxDt6FFFoYoFjftiT3gGus68AqNw

    npm.io

Thank you! :heart:

:scroll: License

MIT