PayU software development kit for PHP
The easiest way to install payu is through composer.
composer require ideasoft/payu
Example file : create_token.php
<?php
// request
$request = new CreateTokenRequest($param);
/** @var \IdeaSoft\PayU\Response\CreateTokenResponse $response */
$response = $request->send();
$token = $response->getTokenHash();
Example file : pay_with_token.php
<?php
// request
$request = new PayWithTokenRequest($param);
/** @var \IdeaSoft\PayU\Response\PayWithTokenResponse $response */
$response = $request->send();
$refNo = $response->getRefNo();