diff --git a/functions.php b/functions.php index 5748d5f..19c5c5d 100644 --- a/functions.php +++ b/functions.php @@ -1241,7 +1241,7 @@ function simpleVendorsWithProducts() } } */ -function getVendorbyId($id) +function getVendorbyId($id, $token) { $url = "https://" . $_SESSION["data_endpoint"] . "/api/v1/vendors/$id"; $curl = curl_init(); @@ -1256,7 +1256,9 @@ function getVendorbyId($id) CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( - 'X-Api-Key: {{apiKey}}' + 'X-Api-Key: {{apiKey}}', + 'Content-Type: application/json', + 'Authorization: Bearer ' . $token ), )); $response = curl_exec($curl); diff --git a/vendor-payouts.php b/vendor-payouts.php index ceaf2c0..5261c75 100644 --- a/vendor-payouts.php +++ b/vendor-payouts.php @@ -156,14 +156,19 @@ if ($_SESSION["userId"] <> "") { -