Answer the question
In order to leave comments, you need to log in
How to process response from liqpay yii2?
Good day! With the help of LiqPay API, I made a request form and everything works well (for sending).
Here is such a controller (slightly modified for Yii2): LiqPayController
And the form itself:
$liqpay = new LiqPayController(Yii::$app->params['public_key'], Yii::$app->params['private_key']);
echo $html = $liqpay->cnb_form([
'action' => 'pay',
'amount' => '5',
'currency' => 'UAH',
'description' => 'Описание услуги',
'order_id' => 'order_id_1',
'version' => '3',
'sandbox' => '1',
]);
Answer the question
In order to leave comments, you need to log in
It turns out everything is very easy. You just need to write in the file receiving the answer:base64_decode(Yii::$app->request->post('data'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question