Node module for Easypay API.
var Easypay = require('node-easypay');
var easypay = new Easypay('web_key');
For tests pass true as second param.
Currently SOAP is not implemented.
easypay.createInvoice({
'EP_MerNo': 'ok1111'
'EP_OrderNo': '12312412',
'EP_Sum': 12.50,
'EP_Expires': 2,
'EP_Comment': 'Тест',
'EP_OrderInfo': 'Тест',
'EP_Success_URL': 'http://mytestshop.by/success/',
'EP_Cancel_Url': 'http://mytestshop.by/cancel/',
'EP_Debug': '0'
})
.then(function(res) {
...
})
.catch(function(err) {
...
})
var signature = easypay.createSignature({
'EP_OrderNo': '12312412',
'EP_Sum': 12.50,
'EP_Expires': 2,
'EP_Comment': 'Тест',
'EP_OrderInfo': 'Тест',
'EP_Success_URL': 'http://mytestshop.by/success/',
'EP_Cancel_Url': 'http://mytestshop.by/cancel/',
'EP_Debug': '0'
}, 'secret_key');
easypay.checkSignature(params_from_easypay, 'secret_key');
easpay.parseNotification(body)
.then(function(result) {
...
})
.catch(function(err) {
...
})
npm run test
MIT