PayController.php 760 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace addons\HuijuBill\api\modules\v1\controllers;
  3. use addons\HuijuBill\common\global_func\Payment;
  4. use Yii;
  5. use yii\web\Controller;
  6. /**
  7. * 支付控制器
  8. *
  9. * Class PayController
  10. * @package addons\HuijuBill\api\modules\v1\controllers
  11. */
  12. class PayController extends Controller
  13. {
  14. public $modelClass = '';
  15. /**
  16. * 不用进行登录验证的方法
  17. *
  18. * 例如: ['index', 'update', 'create', 'view', 'delete']
  19. * 默认全部需要验证
  20. *
  21. * @var array
  22. */
  23. protected $authOptional = ['index'];
  24. /**
  25. * 首页
  26. *
  27. * @return string
  28. */
  29. public function actionIndex()
  30. {
  31. $order_no = $this->request->getQueryParam('order_no');
  32. echo Payment::getAlipayHtml($order_no);
  33. }
  34. }