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

View File

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