invokatis/sendotp

API abstraction for SendOTP service by MSG91.

Installs: 615

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/invokatis/sendotp

1.2.2 2019-08-06 12:17 UTC

This package is auto-updated.

Last update: 2025-10-07 02:33:39 UTC


README

API abstraction for SendOTP service by MSG91.

Latest Version Downloads PHP Version License

SensioLabsInsight

Install

composer require invokatis/sendotp

Usage

<?php

/**
 * @desc Create a SendOTP\Client with your auth key.
 */
$client = new SendOTP\Client('<auth-key>');

/**
 * @desc Send and retrieve whether successful or not.
 */
$sent = $client->generate('9876543210', '91');

/**
 * @desc Verify an OTP entered by user.
 */
$ok = $client->verify($_POST['otp'], '9876543210', '91');
if ($ok) {
    // OTP verified successfully!
}

License

See LICENSE.md file.