From 9b415b98c2de7c20751cbc29f022f2156ef25cab Mon Sep 17 00:00:00 2001 From: Semenov Date: Fri, 10 Jun 2022 15:23:07 +0300 Subject: [PATCH] big update --- src/YookassaPaysystemHandler.php | 2 ++ src/controllers/YookassaController.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/YookassaPaysystemHandler.php b/src/YookassaPaysystemHandler.php index 7d3fdaa..b326c36 100644 --- a/src/YookassaPaysystemHandler.php +++ b/src/YookassaPaysystemHandler.php @@ -226,6 +226,7 @@ public function actionPayOrder(ShopOrder $shopOrder) \Yii::info(print_r($payment, true), self::class); if (!$payment->id) { + \Yii::error('Yandex kassa payment id not found', self::class); throw new Exception('Yandex kassa payment id not found'); } @@ -241,6 +242,7 @@ public function actionPayOrder(ShopOrder $shopOrder) ]; if (!$model->save()) { + \Yii::error("Не удалось сохранить платеж: ".print_r($model->errors, true), self::class); throw new Exception("Не удалось сохранить платеж: ".print_r($model->errors, true)); } diff --git a/src/controllers/YookassaController.php b/src/controllers/YookassaController.php index 175f15b..d882e5e 100644 --- a/src/controllers/YookassaController.php +++ b/src/controllers/YookassaController.php @@ -59,7 +59,8 @@ public function actionPaymentListener() \Yii::info("Оплата: ".print_r($shopBill->id, true), self::class); if (!$shopBill) { - throw new Exception("Не найден платеж на сайте"); + \Yii::error("Не найден счет на сайте " . $paymentId, self::class); + throw new Exception("Не найден счет на сайте " . $paymentId); } /* @@ -112,7 +113,7 @@ public function actionPaymentListener() $shopPayment->amount = $shopBill->amount; $shopPayment->currency_code = $shopBill->currency_code; $shopPayment->shop_pay_system_id = $shopBill->shop_pay_system_id; - $shopPayment->shop_buyer_id = $shopBill->shop_buyer_id; + $shopPayment->cms_user_id = $shopBill->cms_user_id; $shopPayment->shop_order_id = $shopBill->shop_order_id; $shopPayment->external_id = $shopBill->external_id; $shopPayment->external_data = $shopBill->external_data;