1. Go to this page and download the library: Download dmitriymikheev/yii2-odysseq 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/ */
public function actions()
{
return [
'odysseq-callback' => [
'class' => \dmitriymikheev\odysseq\actions\CallbackAction::class,
'callback' => [$this, 'successCallback'],
'component_id' => 'odysseq' //component id that was specified in the config file
]
];
}
public function beforeAction($action)
{
if ($action->id == 'odysseq-callback') {
$this->enableCsrfValidation = false;
}
return parent::beforeAction($action);
}
public function successCallback($model)
{
//here you can change the status of the bid in your database
//Remember that to inform the service about the successful processing of the notification, please return a json response {"status": 200}
//Example:
$response = Yii::$app->getResponse();
$response->format = yii\web\Response::FORMAT_JSON;
$response->data = ['status' => 200];
return $response->send();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.