PHP code example of payuni / sdk

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

    

payuni / sdk example snippets


$payuniApi = new \Payuni\Sdk\PayuniApi($merKey, $merIV);

$payuniApi = new \Payuni\Sdk\PayuniApi($merKey, $merIV, $type);

$result = $payuniApi->UniversalTrade($encryptInfo, $mode);

$result = $payuniApi->ResultProcess($requestData);

  $encryptInfo = [
            'MerID' => 'ABC',
            'Timestamp' => time(),
            ...
        ];
  

  $encryptInfo = [
            'IsPlatForm' => 1,
            'MerID' => 'ABC',
            'Timestamp' => time(),
            ...
        ];
  

namespace Payuni\Sdk;
1234567890123456789012';
$merIV  = '1234567890123456';
$payuni = new PayuniApi($merKey, $merIV);

$encryptInfo = [
    'MerID' => 'ABC',
    'TradeNo'   => '16614190477810373246',
    'Timestamp' => time()
];
$result = $payuni->UniversalTrade($encryptInfo, 'trade_query');