CompraFácil
CompraFácil payment gateway wrapper.
A JavaScript wrapper for interacting with the CompraFácil SOAP webservices.
Install
$ npm install --save comprafacil
Usage
Create SOAP client
var comprafacil = ; var options = wsdl: 'http://example.com/webservice?WSDL' {} {}; compraFacil;
Get information about references
var options = username: 'foo' password: 'bar' dateStartStr: 'dd-MM-yyyy hh:mm:ss' dataEndStr: 'dd-MM-yyyy hh:mm:ss' type: 'R' {} {}; compraFacil;
Get information about a reference
var options = username: 'foo' password: 'bar' reference: '000 000 000' {} {}; compraFacil;
Get a new MULTIBANCO reference
var options = username: 'foo' password: 'bar' amount: 1 email: 'user@example.com' {} {}; compraFacil;
Get a new MULTIBANCO reference specifying a product
var options = username: 'foo' password: 'bar' productID: 0 quantity: 1 email: 'user@example.com' {} {}; compraFacil;
Get a new PayShop reference
var options = username: 'foo' password: 'bar' amount: 1 email: 'user@example.com' {} {}; compraFacil;
Get a new PayShop reference specifying a product
var options = username: 'foo' password: 'bar' productID: 0 quantity: 1 email: 'user@example.com' {} {}; compraFacil;
Tests
$ npm run test
Changelog
1.1.0
- Bug fixing and code review
1.0.0
- Stable release
License
MIT