You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
payment/app/Controller/Payment/PayController.php

64 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Controller\Payment;
use Hyperf\HttpServer\Contract\RequestInterface;
use App\Service\PaymentService;
class PayController extends AbstractController
{
private PaymentService $paymentService;
public function __construct(PaymentService $paymentService)
{
$this->paymentService = $paymentService;
}
public function bindCard(RequestInterface $request)
{
$data = $this->paymentService->bindCard($request->all());
return $this->success($data);
}
public function bindCardConfirm(RequestInterface $request)
{
$data = $this->paymentService->bindCardConfirm($request->all());
return $this->success($data);
}
public function unBindCard(RequestInterface $request)
{
$data = $this->paymentService->unBindCard($request->all());
return $this->success($data);
}
public function protocolPayPreRequest(RequestInterface $request)
{
$data = $this->paymentService->protocolPayPreRequest($request->all());
return $this->success($data);
}
public function protocolPayConfirm(RequestInterface $request)
{
$data = $this->paymentService->protocolPayConfirm($request->all());
return $this->success($data);
}
public function refund(RequestInterface $request) {
$data = $this->paymentService->refund($request->all());
return $this->success($data);
}
public function refundQuery(RequestInterface $request) {
$data = $this->paymentService->refundQuery($request->all());
return $this->success($data);
}
public function paymentQuery(RequestInterface $request) {
$data = $this->paymentService->paymentQuery($request->all());
return $this->success($data);
}
}