--- /dev/null
+<?php
+
+namespace app\actions\cron;
+
+use yii\base\Action;
+
+class CallbackAction extends Action
+{
+ public function run() {
+ return $this->controller->renderPartial('callback');
+ }
+}
\ No newline at end of file
'bonus-users-sale-update' => \app\actions\cron\BonusUsersSaleUpdateAction::class,
// '1c-check-1day' => \app\actions\cron\OneCCheckOneDayAction::class,
'get-token' => \app\actions\cron\GetTokenAction::class,
+ 'callback' => \app\actions\cron\CallbackAction::class,
];
}
}
exit('Incorrect secret phrase');
}
-chmod(SECRET_FILE, 0740);
+chmod(__DIR__ . "/../../../inc/amo/" . SECRET_FILE, 0740);
if (!empty($_GET['grant_type']) && $_GET['grant_type'] == 'refresh_token') {
$method = 'refresh_token';
- $values = json_decode(file_get_contents(SECRET_FILE), true);
+ $values = json_decode(file_get_contents(__DIR__ . "/../../../inc/amo/" . SECRET_FILE), true);
$value = $values['refresh_token'];
$response = json_encode($arr_token, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
-var_dump(file_put_contents(SECRET_FILE, $response));
+var_dump(file_put_contents(__DIR__ . "/../../../inc/amo/" . SECRET_FILE, $response));