Ver código fonte

PayStack支付回调鉴权

kevin_zhangl 3 anos atrás
pai
commit
bb5417ce66

+ 14 - 0
frontendApi/modules/v1/controllers/ShopController.php

@@ -37,6 +37,20 @@ use Yii;
 class ShopController extends BaseController {
 class ShopController extends BaseController {
     public $modelClass = DecOrder::class;
     public $modelClass = DecOrder::class;
 
 
+    protected $_method_not_check = [
+        'actionVerifyApproachOrder'
+    ];
+
+    public function beforeAction($action)
+    {
+        $currentAction = $action->id;
+        if (in_array($currentAction, $this->_method_not_check)) {
+            $action->controller->enableCsrfValidation = false;
+        }
+
+        return parent::beforeAction($action);
+    }
+
     /**
     /**
      * 商品列表
      * 商品列表
      * @return mixed
      * @return mixed