2024-02-12 10:35:09 +08:00
|
|
|
<?php
|
2024-02-16 11:18:40 +08:00
|
|
|
include "functions.php";
|
2024-02-12 10:35:09 +08:00
|
|
|
$productId = $_GET['id'];
|
|
|
|
$curl = curl_init();
|
2024-02-16 11:18:40 +08:00
|
|
|
$url = "https://".$_SESSION["data_endpoint"]."/api/v1/products/".$productId;
|
2024-02-12 10:35:09 +08:00
|
|
|
curl_setopt($curl,CURLOPT_URL,$url);
|
|
|
|
curl_setopt_array($curl, array(
|
|
|
|
//CURLOPT_URL => 'https://api.obanana.shop/api/v1/products/656717579624f6181c49cdda',
|
|
|
|
CURLOPT_RETURNTRANSFER => true,
|
|
|
|
CURLOPT_ENCODING => '',
|
|
|
|
CURLOPT_MAXREDIRS => 10,
|
|
|
|
CURLOPT_TIMEOUT => 0,
|
|
|
|
CURLOPT_FOLLOWLOCATION => true,
|
|
|
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
|
|
|
CURLOPT_CUSTOMREQUEST => 'DELETE',
|
|
|
|
CURLOPT_HTTPHEADER => array(
|
|
|
|
'X-Api-Key: {{apiKey}}'
|
|
|
|
),
|
|
|
|
));
|
|
|
|
|
|
|
|
$response = curl_exec($curl);
|
|
|
|
|
|
|
|
curl_close($curl);
|
|
|
|
header("location: vendor-all-product-list.php");
|
|
|
|
echo $response;
|