wip
This commit is contained in:
@@ -55,9 +55,11 @@ 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) {
|
||||||
$hasBeenPaid = true;
|
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 = 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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user