kevin 1 год назад
Родитель
Сommit
9d1b8b3890
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      common/models/forms/ApproachOrderForm.php

+ 3 - 0
common/models/forms/ApproachOrderForm.php

@@ -235,6 +235,7 @@ class ApproachOrderForm extends Model
     public function verifyPayUPOP(): ?bool
     {
         if (!$this->validate()) {
+            LoggerTool::error(['UPOP - webhook: (validate).']);
             return null;
         }
 
@@ -247,6 +248,7 @@ class ApproachOrderForm extends Model
             $this->_model->NOTE = json_encode($this->note);
             $this->_model->PAY_AT = strtotime($this->note['pay_time']);
             if (!$this->_model->save()) {
+                LoggerTool::error(['UPOP - webhook: (update).']);
                 throw new Exception(Form::formatErrorsForApi($this->_model->getErrors()));
             }
 
@@ -263,6 +265,7 @@ class ApproachOrderForm extends Model
             $transaction->commit();
             return true;
         } catch (Exception $e) {
+            LoggerTool::error(['UPOP - webhook: (exp).' . $e->getFile() . '  ' . $e->getMessage()]);
             $transaction->rollBack();
             $this->addError('edit', $e->getFile() . '  ' . $e->getMessage());
             return null;