Explorar o código

PayStack支付回调鉴权

kevin_zhangl %!s(int64=3) %!d(string=hai) anos
pai
achega
bb5417ce66
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      frontendApi/modules/v1/controllers/ShopController.php

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

@@ -37,6 +37,20 @@ use Yii;
 class ShopController extends BaseController {
     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