fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
+3 -2
View File
@@ -14,11 +14,11 @@ class RefundPayoutService
public function recordPayment(int $refundId, array $payload, int $actorId): array
{
$refund = Refund::query()->find($refundId);
if (!$refund) {
if (! $refund) {
return ['ok' => false, 'message' => 'Refund not found.'];
}
if (!in_array($refund->status, [Refund::STATUS_APPROVED, Refund::STATUS_PARTIAL], true)) {
if (! in_array($refund->status, [Refund::STATUS_APPROVED, Refund::STATUS_PARTIAL], true)) {
return ['ok' => false, 'message' => 'Refund must be Approved or Partial to pay.'];
}
@@ -126,6 +126,7 @@ class RefundPayoutService
return $latest ? (int) $latest->id : null;
} catch (\Throwable $e) {
Log::warning('Refund invoice assignment failed.', ['error' => $e->getMessage()]);
return null;
}
}