这是什么服务器?如何进行此为req和res ??
我尝试从api获取加密密钥,但是我也不知道在哪里使用该密钥
server.get('/make-payment', function(req, res) {
ccavenue.makePayment(res); // It will redirect to ccavenue payment
});
// Server url should be as redirect url (which you are passing as Redirect Url).
server.post('/redirect-link', function response(req, res) {
var data = ccavenue.paymentRedirect(req); //It will get response from ccavenue payment.
if(data.isCheckSumValid == true && data.AuthDesc == 'Y') {
// Success
// Your code
} else if(data.isCheckSumValid == true && data.AuthDesc == 'N') {
// Unuccessful
// Your code
} else if(data.isCheckSumValid == true && data.AuthDesc == 'B') {
// Batch processing mode
// Your code
} else {
// Illegal access
// Your code
}
});
它应重定向到cc avenue网页