Created
July 21, 2016 17:00
-
-
Save darilldrems/c6b16530415685b7438401a40b44a093 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PayWithCapture = require('PayWithCapture'); | |
var clientId = "eyet636484u4h", //Your clientId is in your PayWithCapture DevCenter account page | |
clientSecret = "736484yekhgutit857485", //Your clientSecret is in your PayWithCapture DevCenter account page | |
env = "staging"; // env can either be staging or production | |
var pwcClient = new PayWithCapture(clientId, clientSecret, env); | |
var otpClient = pwcClient.getOtp(); | |
//this method will send otp to phone number | |
otpClient.sendSmsOtp(phone) | |
.then(function(resp){ | |
// do whatever you want with the response. | |
// do JSON.stringify the response to see all attributes available | |
}); | |
//this method will send voice otp to the phone number | |
otpClient.sendVoiceOtp(phone) | |
.then(function(resp){ | |
// do whatever you want with the response. | |
// do JSON.stringify the response to see all attributes available | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment