PaymentController.php 631 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Http\Controllers\Client;
  3. use App\Http\Controllers\Controller;
  4. use App\Services\Client\PaymentService;
  5. use Illuminate\Http\Request;
  6. /**
  7. * @group 用户端
  8. *
  9. * 支付相关的API接口
  10. */
  11. class PaymentController extends Controller
  12. {
  13. protected PaymentService $service;
  14. public function __construct(PaymentService $service)
  15. {
  16. $this->service = $service;
  17. }
  18. /**
  19. * 获取支付配置
  20. */
  21. public function getConfig(Request $request)
  22. {
  23. $orderId = $request->input('order_id');
  24. return $this->success($this->service->getPaymentConfig($orderId));
  25. }
  26. }