wip
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user