新增模拟支付接口

This commit is contained in:
2023-03-15 16:15:47 +08:00
parent cff132c5d4
commit f2450cbcd5
4 changed files with 149 additions and 28 deletions
+17
View File
@@ -6,6 +6,7 @@ use App\Request\InquiryRequest;
use App\Request\PatientOrderRequest;
use App\Services\InquiryService;
use App\Services\PatientOrderService;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
@@ -142,6 +143,22 @@ class PatientOrderController extends AbstractController
return $this->response->json($data);
}
/**
* 模拟支付成功-金额为0时使用
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface|GuzzleException
*/
public function addPatientOrderPay(): ResponseInterface
{
$request = $this->container->get(PatientOrderRequest::class);
$request->scene('addPatientOrderPay')->validateResolved();
$PatientOrderService = new PatientOrderService();
$data = $PatientOrderService->addPatientOrderPay();
return $this->response->json($data);
}
/**
* 创建药品订单
* @return ResponseInterface