doku_library

0.0.11 • Public • Published

DOKU - NPM for NODE JS

Install with npm

npm install doku_library

Then include doku in your node app:

How to use

var helper = require('doku_library').helper();
var library = require('doku_library').library();
var config = require('doku_library').config();
var api = require('doku_library').api();

helper

To use doku helper

var result = helper.sha1(value);

library

To use doku library

var generate_words = library.doCreateWords(request, request.body.MALLID, sharekey);

Inside doku library there are 3 functions doCreateWords, doCreateWordsRaw and formatBasket.

config

To use doku config

var sharekey = config.share_key;

Inside config is JSON that contain url and configuration value for this project.

api

To use doku api

api.doPayment(data_payment, function(res){
    var obj = JSON.parse(JSON.stringify(res));
    if (obj.res_response_msg == "SUCCESS" && obj.res_response_code == "0000"){
        //SUCCESS RESPONSE
    } else {
        //FAILED RESPONSE
    }
});

Inside doku api there are 4 functions doPayment, doPrePayment, doDirectPayment and doReDirectPayment.

Questions?

If you have any questions, please feel free to email us codeplush.inc@gmail.com

Package Sidebar

Install

npm i doku_library

Weekly Downloads

7

Version

0.0.11

License

MIT

Last publish

Collaborators

  • codeplush