Answer the question
In order to leave comments, you need to log in
How to accept liqpay payment?
I have a problem when I make a payment on the site, the server sends me changes:
{"action":"pay","payment_id":234355738,"status":"sandbox","version":3,"type":"donate","paytype":"card","public_key":"i52889167357","acq_id":414963,"order_id":"UO3FSFRK1472553589049289","[email protected]
<?
$amaunt = $_POST['amaunt'];
$public_key = 'i528891673432432432';
//указываем приватный ключ liqpay
$private_key = 'Ac3Cpg*******';
//подключаем библиотеку liqpay
require("LiqPay.php");
//создаем обьект класса LiqPay
$liqpay = new LiqPay($public_key, $private_key);
//Обращаемся к методу cnb_form указывая необходимые настройки для создания формы с кнопкой оплатить
$data = array();
$data['form'] = $liqpay->cnb_form(array(
'version' => '3',
'amount' => $amaunt,
'currency' => 'UAH',
'description' => 'Пополнения счёта на сумму - '.$amaunt,
'order_id' => $Nzakaz,
'language' => 'ru',
'type' => 'donate',
'result_url' => 'http://likser.ru/payment/payments.php',
'server_url' => 'http://likser.ru/payment/payment.php',
'sandbox' => 1,
'info' => '321',
'dae' => 'ewogICJhaXJMaW5lIjogIkROSVBST0FWSUEiLAogICJ0aWNr
ZXROdW1iZXIiOiAiQUNTRkQxMjM1NFNBIiwKICAicGFzc2VuZ2VyTmFtZSI6ICJKb2huIERvZSIs
CiAgImZsaWdodE51bWJlciI6ICI3NDIiLAogICJvcmlnaW5DaXR5IjogIkRQIiwKICAiZGVzdGluY
XRpb25DaXR5IjogIk5ZIiwKICAiZGVwYXJ0dXJlRGF0ZSI6ICIxMDA1MTQiCn0='
));
echo $data['form'];
?>
Answer the question
In order to leave comments, you need to log in
Thanks for your code! You did everything right but did not specify the required parameter
'action' => 'pay',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question