public function actionCheckOrders($id)
{
$model = $this->findModel($id);
- $content = json_decode($model->raw_data, false, 512, JSON_THROW_ON_ERROR);
+ $json = '{
+ "pager": {
+ "total": 32,
+ "from": 1,
+ "to": 32,
+ "currentPage": 1,
+ "pagesCount": 1,
+ "pageSize": 50
+ },
+ "orders": [' . $model->raw_data . '],
+ "paging": {}
+ }';
+ $content = json_decode($json, false, 512, JSON_THROW_ON_ERROR);
+
$testCampaignId = 109969229;
$testData = ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\GetOrdersResponse', []);
if (!empty($testData) && isset($testData['orders'])) {
$ordersData[$testCampaignId] = $testData['orders'];
$result = MarketplaceService::processOrders($ordersData);
if (!empty($result)) {
+ Yii::error('Заказ обновлен: ' . json_encode($result, JSON_UNESCAPED_UNICODE));
Yii::$app->session->setFlash('success', 'Заказ обновлен.');
}
}