S
S
Sergey2015-10-21 14:39:47
Yii
Sergey, 2015-10-21 14:39:47

How to connect liqpay on yii2?

I'm trying to connect with the ability to change the price I
downloaded the extension from this link https://github.com/delagics/yii2-liqpay , and connected
the Liqpay class There
I took the creation of the form and signature from the liqpay api

public function actionTest()
    {
$liqpay = new LiqPay($public_key, $private_key);
$html = $liqpay->cnb_form(array(
  'version'        => '3',
  'amount'         => '1',
  'currency'       => 'USD',
  'description'    => 'description text',
  'order_id'       => 'order_id_1'
));
$liqpay = new LiqPay($public_key, $private_key);
$html = $liqpay->cnb_signature(array(
  'version'        => '3',
  'amount'         => '1',
  'currency'       => 'USD',
  'description'    => 'description text',
  'order_id'       => 'order_id_1'
));
 return $this->render('test');
    }

I added them to the controller, I can’t understand what to do next, tell me how to insert all this into a view in a form?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-10-21
@alekskondr

return $this->render('test',['html'=>$html]);
view:
<?=$html?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question