Explorar el Código

跨境商品支付接入

kevin hace 1 año
padre
commit
f28dc4c2f1
Se han modificado 1 ficheros con 5 adiciones y 6 borrados
  1. 5 6
      common/models/forms/ApproachOrderForm.php

+ 5 - 6
common/models/forms/ApproachOrderForm.php

@@ -128,17 +128,16 @@ class ApproachOrderForm extends Model
         LoggerTool::error(['UPOP - webhook: (beforeValidate 1).']);
         $parentValidate = parent::beforeValidate();
         if ($this->sn) {
+            LoggerTool::error(['UPOP - webhook: (beforeValidate 2).', $this->sn]);
             $this->_model = ApproachOrder::findOne(['SN' => $this->sn]);
-            LoggerTool::error(['UPOP - webhook: (beforeValidate 2).', $this->_model]);
-            if (!ApproachOrder::findOneAsArray('SN=:SN', [':SN' => $this->sn])){
-                LoggerTool::error(['UPOP - webhook: (beforeValidate 3).', $this->_model]);
+            LoggerTool::error(['UPOP - webhook: (beforeValidate 3).', $this->_model]);
+            if (!$this->_model) {
+                LoggerTool::error(['UPOP - webhook: (beforeValidate 4).', $this->_model]);
                 $this->addError('sn', '订单不存在');
                 return false;
             }
         }
-
-        LoggerTool::error(['UPOP - webhook: (beforeValidate 4).']);
-
+        LoggerTool::error(['UPOP - webhook: (beforeValidate 5).', $this->_model]);
         return $parentValidate;
     }