|
|
@@ -37,20 +37,21 @@ use Yii;
|
|
|
class ShopController extends BaseController {
|
|
|
public $modelClass = DecOrder::class;
|
|
|
|
|
|
- protected $_method_not_check = [
|
|
|
- 'actionVerifyApproachOrder',
|
|
|
- 'verify-approach-order'
|
|
|
- ];
|
|
|
-
|
|
|
- public function beforeAction($action)
|
|
|
- {
|
|
|
- $currentAction = $action->id;
|
|
|
- if (in_array($currentAction, $this->_method_not_check)) {
|
|
|
- $action->controller->enableCsrfValidation = false;
|
|
|
- }
|
|
|
-
|
|
|
- return parent::beforeAction($action);
|
|
|
- }
|
|
|
+// public function beforeAction($action)
|
|
|
+// {
|
|
|
+// parent::beforeAction($action);
|
|
|
+//
|
|
|
+// // 指定接口不进行校验
|
|
|
+// $currentAction = $action->id;
|
|
|
+// LoggerTool::notice($currentAction);
|
|
|
+// if (in_array($currentAction, $this->_method_not_check)) {
|
|
|
+// $action->controller->enableCsrfValidation = false;
|
|
|
+// LoggerTool::notice($action->controller->enableCsrfValidation);
|
|
|
+// }
|
|
|
+// LoggerTool::notice($action->controller->enableCsrfValidation);
|
|
|
+//
|
|
|
+// return true;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 商品列表
|
|
|
@@ -193,13 +194,13 @@ class ShopController extends BaseController {
|
|
|
* @throws \yii\web\HttpException
|
|
|
*/
|
|
|
public function actionVerifyApproachOrder() {
|
|
|
- $request = \Yii::$app->request;
|
|
|
- LoggerTool::info($request);
|
|
|
-
|
|
|
- http_response_code(200);
|
|
|
-
|
|
|
- if (parent::edit(ApproachOrderForm::class, 'PayStack pay Success', 'verifyPayStack', ['verifyPayStack'])) {
|
|
|
- return http_response_code(200);
|
|
|
+ LoggerTool::info('isPost => ' . \Yii::$app->request->isPost);
|
|
|
+ if (\Yii::$app->request->isPost) {
|
|
|
+ $params = \Yii::$app->request->post();
|
|
|
+ LoggerTool::info($params);
|
|
|
+// if (parent::edit(ApproachOrderForm::class, 'PayStack pay Success', 'verifyPayStack', ['verifyPayStack'])) {
|
|
|
+// return http_response_code(200);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
return http_response_code(500);
|