### Install Payuni PHP SDK using Composer Source: https://github.com/payuni/php_sdk/blob/main/README.md Installs the Payuni PHP SDK using Composer, a dependency manager for PHP. Ensure Composer is installed on your system. ```bash composer require payuni/sdk ``` -------------------------------- ### Execute a Trade Query Transaction Source: https://github.com/payuni/php_sdk/blob/main/README.md Demonstrates a complete example of initializing the SDK and performing a trade query. It includes setting up merchant keys, initializing the API, and calling the UniversalTrade method with specific parameters. ```php namespace Payuni\Sdk; require_once('/PayuniApi.php'); $merKey = '12345678901234567890123456789012'; $merIV = '1234567890123456'; $payuni = new PayuniApi($merKey, $merIV); $encryptInfo = [ 'MerID' => 'ABC', 'TradeNo' => '16614190477810373246', 'Timestamp' => time() ]; $result = $payuni->UniversalTrade($encryptInfo, 'trade_query'); ``` -------------------------------- ### Construct EncryptInfo for Transactions Source: https://github.com/payuni/php_sdk/blob/main/README.md Provides examples of constructing the $encryptInfo array, which contains transaction details like MerID, Timestamp, and optional parameters like IsPlatForm for platform usage. ```php $encryptInfo = [ 'MerID' => 'ABC', 'Timestamp' => time(), ... ]; ``` ```php $encryptInfo = [ 'IsPlatForm' => 1, 'MerID' => 'ABC', 'Timestamp' => time(), ... ]; ``` -------------------------------- ### Initialize PayuniApi for Production and Test Environments Source: https://github.com/payuni/php_sdk/blob/main/README.md Demonstrates how to initialize the PayuniApi class for both the production and test environments. The test environment requires an additional type parameter. ```php $payuniApi = new \Payuni\Sdk\PayuniApi($merKey, $merIV); ``` ```php $payuniApi = new \Payuni\Sdk\PayuniApi($merKey, $merIV, $type); ``` -------------------------------- ### Processupp Return URL and Notify URL Parameters Source: https://github.com/payuni/php_sdk/blob/main/README.md Explains how to process the parameters received from upp ReturnURL and NotifyURL using the ResultProcess method of the PayuniApi class. ```php $result = $payuniApi->ResultProcess($requestData); ``` -------------------------------- ### Process Universal Trade Transactions Source: https://github.com/payuni/php_sdk/blob/main/README.md Shows how to use the UniversalTrade method of the PayuniApi class to process transactions. This method requires encrypted information, a mode, and optionally a version. ```php $result = $payuniApi->UniversalTrade($encryptInfo, $mode, $version); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.