fix(security): prevent payment gateway credentials leakage via OrderResource

This commit is contained in:
xboard
2026-04-23 10:25:32 +08:00
parent df77cbfb47
commit 2efef9e8ee
4 changed files with 13 additions and 3 deletions
+2 -2
View File
@@ -29,14 +29,14 @@ class PaymentService
if (!$paymentModel) {
throw new ApiException('payment not found');
}
$payment = $paymentModel->toArray();
$payment = $paymentModel->makeVisible('config')->toArray();
}
if ($uuid) {
$paymentModel = Payment::where('uuid', $uuid)->first();
if (!$paymentModel) {
throw new ApiException('payment not found');
}
$payment = $paymentModel->toArray();
$payment = $paymentModel->makeVisible('config')->toArray();
}
$this->config = [];