yushni/liq-pay-sdk

This library must simplify your connection with Liq Pay payment system.

1.0.1 2019-03-02 14:28 UTC

This package is auto-updated.

Last update: 2025-05-29 01:13:31 UTC


README

Installation

composer require yushni/liq-pay-sdk

Simple usage :

Create LiqPay class
$encoder = new LiqPay\Encoder\Encoder();
$liqPay = new LiqPay\LiqPay('privateKey', 'publicKey', true, $encoder);
Generate checkout url
$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);
Obtain callback results
$liqPay->obtainCallback('data', 'signature');

Advanced usage

You can make your own Action and declare it. Action must be instance of LiqPay\Action\Action class.
$liqPay->addAction(LiqPay\Action\Payment, ['pay'])