PHP code example of inarli / payu-tools

1. Go to this page and download the library: Download inarli/payu-tools 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/ */

    

inarli / payu-tools example snippets



merchant = new \PayuTools\Merchant('OPU_TEST', 'SECRET_KEY');
    $client = new \PayuTools\Client($merchant);
    $cancelRequest = new \PayuTools\Request\Token\CancelRequest('5213b33bad3c07e87e8f032c94452bdc', 'Token cancelled');
    $response = $client->send($cancelRequest);
    var_dump($response->getStatus());
    var_dump($response->getError());
    var_dump($response->getData());