Skip to content

Instantly share code, notes, and snippets.

@darilldrems
Created July 21, 2016 17:28
Show Gist options
  • Save darilldrems/bc5af6e363bcc17bfaefd2388b9b772b to your computer and use it in GitHub Desktop.
Save darilldrems/bc5af6e363bcc17bfaefd2388b9b772b to your computer and use it in GitHub Desktop.
<?php
use PayWithCapture\PayWithCaptureClient;
//You can find your clientId, $clientSecret in your PayWithCapture DevCenter settings page
$clientId = "745474656hdhdgftfyfjfkg";
$clientSecret = "jyrtr64546470od";
$env = "staging"; // $env should be "staging" when in dev mode and in production change to "production"
$client = new PayWithCaptureClient($clientId, $clientSecret, $env);
$otpClient = $client->getOtpClient();
//this allows you to send otp to a user registering on your application
$phone = "+2349098090424";
$otpResponse = $otpClient->sendVoiceOtp($phone)
//this will allow you to validate the otp from the user
$authResponse = $otpClient->authenticateOtp($otp, $phone);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment