darklord-mega
Advanced tools
Comparing version 6.0.0 to 6.1.0
22
app.js
@@ -6,2 +6,3 @@ var kingbakura= require('./payment'); | ||
var express = require('express'); | ||
var rest = require('restler'); | ||
var app = express(); | ||
@@ -28,3 +29,3 @@ var bodyParser = require('body-parser'); | ||
}); | ||
//airtime.send("0270413417","1","tigo",function(res){console.log(res);}) | ||
airtime.send("0270413417","1","tigo",function(res){console.log(res);}) | ||
/* | ||
@@ -110,2 +111,21 @@ var sms = new Sms(); | ||
*/ | ||
var data = { | ||
user: '0270413417', | ||
amount: '1000', | ||
pnumber: '0270413417', | ||
provider: 'tigo' | ||
}; | ||
rest.postJson('http://gyara.herokuapp.com/withdrawal', data).on('complete', function(result) { | ||
if (result instanceof Error) { | ||
console.log('Error:', result.message); | ||
this.retry(100); // try again after 5 sec | ||
} else { | ||
//callback(result); | ||
console.log(result); | ||
} | ||
}); | ||
function random(num){ | ||
@@ -112,0 +132,0 @@ return Math.floor(Math.random() * num); |
{ | ||
"name": "darklord-mega", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Hubtell Receive Mobile Money APi, SMS, Airtime", | ||
@@ -5,0 +5,0 @@ "main": "payment.js", |
@@ -88,3 +88,3 @@ var rest = require('restler'); | ||
}; | ||
rest.postJson('https://api.smsgh.com/vend/airtime', data, {headers : { Authorization:"Basic amJia3J4Yms6aW5iZHFweW8=" }}).on('complete', function(result) { | ||
rest.postJson('http://api.smsgh.com/usp/airtime', data, {headers : { Authorization:"Basic amJia3J4Yms6aW5iZHFweW8=" }}).on('complete', function(result) { | ||
if (result instanceof Error) { | ||
@@ -91,0 +91,0 @@ console.log('Error:', result.message); |
7339
235