paysera-nodejs
Paysera payment gateway plugin for node.js
Usage
Install this package as a npm dependency:
npm install paysera-nodejs --save
Redirecting to paysera gateway
First, require this package in your script:
var Paysera = ;
Then, Initialize Paysera module with default parameters:
var options = projectid: 'X' sign_password: 'Y' accepturl: 'http://myaccept.url' cancelurl: 'http://mycancel.url' callbackurl: 'http://mycallback.url' test: 0 ...;var paysera = options;
Finally, build and redirect to url with these available parameters:
var params = orderid: 123 p_email: 'customer@email.com' amount: 100 currency: 'EUR' ...;var urlToGo = paysera; // Redirect to urlToGo...
Accepting callback from paysera
Check if callback from paysera is valid:
var request = data: ... ss1: ... ; // the request data you got from paysera callback var isValid = paysera;if isValid // Since callback seems valid decode callback data var order = paysera; // Your code ... to update order status // Don't forget to return "OK" as the response.
All available parameters from callback are specified in paysera specification
Contacts
If any problems occur please feel free to contact support@paysera.com