feat(payment): add endpoint for payment configuration and update UI for test mode
This commit is contained in:
@@ -504,6 +504,15 @@ class PaymentController extends BaseController
|
||||
new OA\Response(response: 404, description: 'Payment not found'),
|
||||
]
|
||||
)]
|
||||
#[IsGranted('IS_AUTHENTICATED_FULLY')]
|
||||
#[Route('/api/v1/payment/config', methods: ['GET'])]
|
||||
public function config(): JsonResponse
|
||||
{
|
||||
return $this->success([
|
||||
'test_mode' => $this->configRepo->get('payment_test_mode') === '1',
|
||||
]);
|
||||
}
|
||||
|
||||
#[IsGranted('IS_AUTHENTICATED_FULLY')]
|
||||
#[Route('/api/v1/payment/{uuid}', methods: ['GET'])]
|
||||
public function getStatus(string $uuid, #[CurrentUser] User $user): JsonResponse
|
||||
|
||||
Reference in New Issue
Block a user