DOKU - NPM for NODE JS
npm install doku_library
Then include doku in your node app:
var helper = require('doku_library').helper();
var library = require('doku_library').library();
var config = require('doku_library').config();
var api = require('doku_library').api();
To use doku helper
var result = helper.sha1(value);
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.
To use doku config
var sharekey = config.share_key;
Inside config is JSON that contain url and configuration value for this project.
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.
If you have any questions, please feel free to email us codeplush.inc@gmail.com