PHP code example of microsec / passbyme2fa-client-php
1. Go to this page and download the library: Download microsec/passbyme2fa-client-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
microsec / passbyme2fa-client-php example snippets
namespace YourLogger;
class Logger implements PassByME\Log\ILogger
{
public function __construct()
{
openlog('PassByME', LOG_PERROR, LOG_SYSLOG);
}
public function info($message)
{
syslog(LOG_INFO, $message);
}
...
$logger = new YourLogger\Logger();
$pbm = new PassByME\Methods\Messaging($logger);
$pbm->trackMessage([messageId]);
$pbm->cancelMessage([messageId]);
$logger = new YourLogger\Logger();
$pbm = new PassByME\Methods\Management($logger);