microsms
v1.0.1
Published
NodeJS API for MicroSMS.pl
Downloads
9
Maintainers
Readme
microsms
MicroSMS API for MicroSMS.pl
var MSMS = require('microsms');
var sms = [[]];
sms[0] = {netto: 0.50, number: 71480, product: 'wojownik'};
sms[1] = {netto: 1.00, number: 72480, product: 'strażak'};
var MicroSMS = new MSMS.MicroSMS({userid: '42', serviceid: '3124'}, sms);
/*
code - Kod wprowadzony przez klienta
*/
MicroSMS.checkCode({code: 'p9j2k5u7'}, function(isOk, errorMsg) {
if(isOk == true) {
console.log('[MicroSMS.pl] Produkt: ' + errorMsg.product);
console.log('[MicroSMS.pl] ' + errorMsg.msg);
} else {
console.log('[MicroSMS.pl] ' + errorMsg.msg);
}
});