1. Go to this page and download the library: Download taron96/omnipay-liqpay 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/ */
$gateway = Omnipay::create('LiqPay');
$gateway->setPublicKey(env('LIQPAY_PUBLIC_KEY'));
$gateway->setPrivateKey(env('LIQPAY_PRIVATE_KEY'));
$request = $this->gateway->fetchTransaction();
$request->setOrderId(XXXX);
$purchase = $request->send();
// Do the rest with $purchase and response with 'OK'
if ($purchase->isSuccessful()) {
// Your logic
}
return new Response('OK');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.