UNPKG

ccavenue-iframe

Version:

"CCavenue Payment Gatewway(iframe)"

22 lines (17 loc) 601 B
var ccav = require('./ccavutil.js'); var http = require('http'); var fs = require('fs'); var qs = require('querystring'); exports.resPost = function(request,response,configParams,callback){ var ccavEncResponse='', ccavResponse='', workingKey = configParams.workingKey, //Put in the 32-Bit key provided by CCAvenues. ccavPOST = ''; var data = qs.stringify(request.body); ccavEncResponse += data; ccavPOST = qs.parse(ccavEncResponse); var encryption = ccavPOST.encResp; ccavResponse = ccav.decrypt(encryption,workingKey); callback(ccavResponse); return; };