fawry-node
Install
The module depends on http module as a peer dependency. In the future it will be pluggable with:
Please make sure to add to your project one of the supported above modules.
$ npm install fawry-node
Usage
const fawry = ; /* params: the object you got at the callback context does: throws an error if messageSignature doesn't match the generated one using your secure key return: insertedParams if falid*/ fawry; /* params: config * for details check contracts/init.js does: leverages JS closure to initialize a Fawry instance with common configration return: { request // http client instance you could intercept, transform do whatever the http module supports charge, refund, status }*/const fawryClient = fawry; /* params: data * for details check contracts/charge.js does: sends a post request with your valid fawry options to the /charge endpint return: Promise*/ fawryClient; /* params: data * for details check contracts/refund.js does: sends a post request with your valid fawry options to the /refund endpint return: Promise*/ fawryClient; /* params: params * for details check contracts/status.js does: sends a get request with your valid fawry options to the /status endpint return: Promise*/ fawryClientstatus merchantCode: '<merchant_code>' merchantRefNumber: 'ssshxb98phmyvm434es62kage3nsm2cj';