RefundController.php 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace addons\YunfastPay\backend\controllers;
  3. use addons\YunfastPay\common\services\RefundService;
  4. /**
  5. * 退款订单控制器
  6. * @package addons\YunfastPay\backend\controllers
  7. */
  8. class RefundController extends BaseController
  9. {
  10. public $enableCsrfValidation = false;
  11. /**
  12. * @var RefundService
  13. */
  14. protected $service;
  15. public function init()
  16. {
  17. parent::init();
  18. $this->service = new RefundService(
  19. ['mall_id' => $this->mall_id]
  20. );
  21. }
  22. /**
  23. * 退款订单列表
  24. *
  25. * @return void
  26. */
  27. public function actionIndex()
  28. {
  29. if ($this->request->isAjax) {
  30. return $this->success(
  31. 'ok',
  32. $this->service->getPageList(
  33. array_merge(
  34. $this->request->post(),
  35. $this->request->get()
  36. )
  37. )
  38. );
  39. }
  40. return $this->render($this->action->id);
  41. }
  42. }