For more information on the services listed above, visit the Ravepay website
How to use
npm install ravepay
You can get your PUBLICK_KEY and SECRET_KEY from the Rave dashboard.
Go here to get your live keys.
Go here to get your live keys.
var Ravepay = require('ravepay');
var rave = new Ravepay(PUBLICK_KEY, SECRET_KEY, PRODUCTION_FLAG);
If you pass true as the value for PRODUCTION_FLAG, the library will use the production url as the base for all calls. Otherwise it will use the staging base url;
var rave = new Ravepay(PUBLICK_KEY, SECRET_KEY, PRODUCTION_FLAG); //Base url is 'https://ravesandboxapi.flutterwave.com'
var rave = new Ravepay(PUBLICK_KEY, SECRET_KEY, true); //Base url is 'http://api.ravepay.co'
Card Charge
var Ravepay =require('ravepay');
var rave =newRavepay(PUBLICK_KEY,SECRET_KEY,false);
rave.Card.charge(
{
"cardno":"5438898014560229",
"cvv":"890",
"expirymonth":"09",
"expiryyear":"19",
"currency":"NGN",
"country":"NG",
"amount":"10",
"pin":"3310",
"suggested_auth":"pin",
"email":"user@gmail.com",
"phonenumber":"0902620185",
"firstname":"temi",
"lastname":"desola",
"IP":"355426087298442",
"txRef":"MC-"+Date.now(),// your unique merchant reference