This commit is contained in:
2024-11-23 17:45:24 +05:00
parent 76bfbc319d
commit 2f0bca93c6

View File

@@ -55,10 +55,12 @@ class MakePaymentNovaVisaMaster extends Action
$today = today(); $today = today();
$hasBeenPaid = false; $hasBeenPaid = false;
$resource->paymentItems->each(function ($item) use ($hasBeenPaid, $today) { $resource->paymentItems->each(function ($item) use (&$hasBeenPaid, $today) {
if (boolval($item->paid) && $today->format('m Y') == $item->created_at->format('m Y')) { if ($item->paid) {
if ($today->format('m Y') == $item->created_at->format('m Y')) {
$hasBeenPaid = true; $hasBeenPaid = true;
} }
}
}); });
if ($hasBeenPaid) { if ($hasBeenPaid) {
@@ -84,8 +86,6 @@ class MakePaymentNovaVisaMaster extends Action
$total_amount = floatval(number_format($fields->payment_amount, 2, '.', '')) + 23; $total_amount = floatval(number_format($fields->payment_amount, 2, '.', '')) + 23;
$total_amount = 0.1;
$payment = $this->order($resource, $total_amount); $payment = $this->order($resource, $total_amount);
if ($payment['status'] !== 'success') { if ($payment['status'] !== 'success') {