PHP code example of yushni / liq-pay-sdk

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

    

yushni / liq-pay-sdk example snippets

 
$encoder = new LiqPay\Encoder\Encoder();
$liqPay = new LiqPay\LiqPay('privateKey', 'publicKey', true, $encoder);

$payment = LiqPay\Action\Payment::pay(1.12, "cab95cee-48b8-423b-8979-1675bb452f13", "UAH", "Description")
$payment->setResultUrl('result_url');
$payment->setServerUrl('server_url');

$liqPay->generateCheckoutUrl($payment);

$liqPay->obtainCallback('data', 'signature');

$liqPay->addAction(LiqPay\Action\Payment, ['pay'])