diff --git a/vendor-payments.php b/vendor-payments.php index be9c8ae..c749025 100644 --- a/vendor-payments.php +++ b/vendor-payments.php @@ -10,18 +10,22 @@ if ($_SESSION["userId"] <> "") { $vendorData = $vendorLoginIdjson['results'][0]; $vendorId = $vendorData['_id']; $_SESSION["LoggedInVendorId"] = $vendorId; - } + + } + $authtoken = $_SESSION['token']; + } else { $_SESSION["isLoggedIn"] = false; header("location: login.php"); } -$products = productList(); -$shopOrders = getOrderbyVendorId($vendorId); -$vendorOrderss = json_decode($shopOrders); -if (is_array($vendorOrderss)) { - $vendorOrders = json_decode($shopOrders); -} elseif (is_object($vendorOrderss) && property_exists($vendorOrderss, 'message')) { +$response = getOrderbyVendorId($vendorId); +$vendorDecode = json_decode($response); + +// var_dump($vendorDecode); +if (is_array($vendorDecode)) { + $vendorOrders = json_decode($response); +} elseif (is_object($vendorDecode) && property_exists($vendorDecode, 'message')) { $vendorOrders = []; } else { echo "Unknown type or no 'message' property found."; @@ -39,7 +43,7 @@ if (is_array($vendorOrderss)) { - + @@ -71,7 +75,23 @@ if (is_array($vendorOrderss)) { /* Set your desired text color for the active tab */ } + #pagination { + display: flex; + list-style: none; + padding: 0; + margin: 0; + justify-content: center; + } + + #pagination a { + color: #333; + text-decoration: none; + padding: 5px 10px; + border: 1px solid #ccc; + border-radius: 4px; + } + @@ -466,20 +663,6 @@ if (is_array($vendorOrderss)) { - - - - - -
@@ -680,6 +863,8 @@ if (is_array($vendorOrderss)) { + +