Answer the question
In order to leave comments, you need to log in
How to receive data from interkassa on Yii2?
I sent a request to the interkassa, received a response, but I don’t know how to accept and save the data in MySQL.
Removed CSRF validation.
public function actionCreate()
{
$model = new Activation();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->active_id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
public function actionFail()
{
$enableCsrfValidation = false;
$model = new Activation();
return $this->render('fail', [
'model' => $model,
]);
}
<?php $form = ActiveForm::begin([
'method' => 'post',
'action' => 'https://sci.interkassa.com/#/paysystem/test',
]); ?>
<?= Html::activeTextInput($model, 'ik_co_id', [ 'name' => 'ik_co_id','value' => '11111111111']) ?>
<?= Html::activeTextInput($model, 'ik_pm_no', [ 'name' => 'ik_pm_no','value' => '11111']) ?>
<?= Html::activeTextInput($model, 'ik_am', [ 'name' => 'ik_am','value' => '100']) ?>
<?= Html::activeTextInput($model, 'ik_cur', [ 'name' => 'ik_cur','value' => 'USD']) ?>
<?= Html::activeTextInput($model, 'ik_desc', [ 'name' => 'ik_desc','value' => 'Description']) ?>
Answer the question
In order to leave comments, you need to log in
See the documentation of the interkassa and integration examples, you have an internal account number in your store, it is either ik_pm_no or ik_co_id, you can use them to pull data from MySQL when receiving a response from the interkassa.
That's understandable. In general, how to get data from the interkassa? And here is the documentation of the interkassa, I looked through it all? Here the problem is in the framework, how to receive data in general?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question