diff --git a/admin/config.php b/admin/config.php index 2c49fab..d51d6b8 100644 --- a/admin/config.php +++ b/admin/config.php @@ -1,8 +1,9 @@
- -
- -
+ for ($x = $start; $x <= $end && $x < $totalUsers; $x++) { + $user = $users[$x]; + ?> +
+ +
+ +
- @@ -284,76 +289,115 @@ if (is_array($vendorOrderss)) { + selectedOrders.forEach(order => { + var orderId = order.orderId; + fetch(`https://api.obanana.shop/api/v1/orders/${orderId}`, { + method: 'PATCH', + headers: { + 'Content-Type': 'application/json', + "Authorization": "Bearer " + token, + }, + body: JSON.stringify({ + payout_status: { + payout_id: data._id, + status: "Processing" + } + }) + }) + .then(response => { + // if (!response.ok) { + // console.error(`Failed to update payout status for order ${orderId}`); + // } + if (!response.ok) { + console.error(`Failed to update payout status for order ${orderId}`); + } else { + location.reload(); + } + }) + .catch(error => { + console.error(`Error updating payout status for order ${orderId}:`, error); + }); + }); + }) + .catch(error => { + console.error('Error:', error); + }); + } + @@ -417,35 +461,6 @@ if (is_array($vendorOrderss)) { - - ₱2,340 - EastWest - **** **** 1234 - Jon-Jon Manaay - Oct 27, 2018 - - Processing - - - - - -