You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
935 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: travis
  5. * Date: 2019/12/12
  6. * Time: 15:59
  7. */
  8. namespace api\controllers;
  9. use yii\web\Response;
  10. use Yii;
  11. use yii\web\BadRequestHttpException;
  12. class WxPaymentController extends CommonController
  13. {
  14. public $modelClass = 'backend\modules\shop\models\ars\Order';
  15. public $className = 'api\logic\WxPaymentLogic';
  16. public function actions()
  17. {
  18. $action = parent::actions();
  19. unset($action['index']);
  20. unset($action['update']);
  21. unset($action['view']);
  22. unset($action['delete']);
  23. return $action;
  24. }
  25. /**
  26. * @return array|bool
  27. * @throws BadRequestHttpException
  28. * @throws \yii\base\InvalidConfigException
  29. * @throws \yii\httpclient\Exception
  30. * 异步回调
  31. */
  32. public function actionNotify()
  33. {
  34. Yii::$app->response->format = Response::FORMAT_XML;
  35. return $this->object->notify();
  36. }
  37. }