PHP code example of konekt / payum-otp-hungary

1. Go to this page and download the library: Download konekt/payum-otp-hungary 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/ */

    

konekt / payum-otp-hungary example snippets


$extension = $container->getExtension('payum');
$extension->addGatewayFactory(new Konekt\PayumOtp\Bridge\Symfony\OtpHungaryOffsiteGatewayFactory());



namespace AppBundle;

use Konekt\PayumOtp\Bridge\Symfony\Event\TransactionError;

class MyOtpListener
{
    /**
     * @param \Konekt\PayumOtp\Bridge\Symfony\Event\TransactionError $event
     */
    public function handleTransactionErrors(TransactionError $event)
    {
        //var_dump($event->getErrors());
        //var_dump($event->getDetails());

        //TODO: implement here some notification logic: ie. send email to the support team
    }
}
kliensek/php/otpwebshop
SDK_DIR