PHP code example of webgriffe / lib-triveneto

1. Go to this page and download the library: Download webgriffe/lib-triveneto 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/ */

    

webgriffe / lib-triveneto example snippets


$client = new \Webgriffe\LibTriveneto\Client($logger);

$client->init($tranPortalId, $password, $initUrl, $action, $secretKey);**

$client->paymentInit($merchantTransactionId, $amount, $currencyCode, $languageId, $notifyUrl, $errorUrl);

$client->paymentVerify($requestParams);

$requestParams = array('paymentid' => ..., 'tranid' => ..., 'result' => ..., etc...);

$factory = new Webgriffe\LibTriveneto\NotificationMessage\Response\GeneratorFactory($result, $successUrl, $errorUrl);
$response = $factory->getGenerator()->generate();