africastalking
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -16,3 +16,3 @@ 'use strict'; | ||
Voice.prototype.call = function (params) { | ||
let options = _.cloneDeep(params); | ||
@@ -23,6 +23,6 @@ let _self = this; | ||
let _validateParams = function () { | ||
var constraints = { | ||
callTo: function (value) { | ||
if (validate.isEmpty(value)) { | ||
@@ -65,3 +65,3 @@ return { | ||
// TODO should this be rejected by promise instead? | ||
var msg = ""; | ||
@@ -94,3 +94,3 @@ for (var k in error) { | ||
rq.end(function (resp) { | ||
if (resp.status === 201) { | ||
if (resp.status === 200 || resp.status === 201) { | ||
// API returns CREATED on success | ||
@@ -134,3 +134,3 @@ resolve(resp.body); | ||
}; | ||
let error = validate(options, constraints); | ||
@@ -160,3 +160,3 @@ if (error) { | ||
}); | ||
rq.send(body); | ||
@@ -163,0 +163,0 @@ |
{ | ||
"name": "africastalking", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Official AfricasTalking node.js API wrapper", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -214,3 +214,3 @@ # africastalking-node.js | ||
### Mobile Money - checkOut | ||
### Mobile Money (mpesa) - check out | ||
```node | ||
@@ -223,3 +223,3 @@ var payment = AfricasTalking.PAYMENT; | ||
currencyCode : 'KES', | ||
metadata : { id: 'A_334646364' }, | ||
metadata : { id: uuid.v4() }, | ||
amount : 100 | ||
@@ -235,1 +235,7 @@ }) | ||
``` | ||
### B2B (mpesa) | ||
??? | ||
### B2C (mpesa) | ||
??? |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66008
239