PHP code example of ideasoft / payu

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

    

ideasoft / payu example snippets



// request
$request = new CreateTokenRequest($param);
/** @var \IdeaSoft\PayU\Response\CreateTokenResponse $response */
$response = $request->send();
$token = $response->getTokenHash();


// request
$request = new PayWithTokenRequest($param);
/** @var \IdeaSoft\PayU\Response\PayWithTokenResponse $response */
$response = $request->send();
$refNo = $response->getRefNo();