From 2706b3d5a3a05924bb9100c27d05936e04126e7b Mon Sep 17 00:00:00 2001 From: LathanDevers Date: Thu, 16 Jul 2026 22:26:55 +0200 Subject: [PATCH] change api --- src/components/dashboard/NewServiceCard.jsx | 2 +- src/services/billing_api.js | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/dashboard/NewServiceCard.jsx b/src/components/dashboard/NewServiceCard.jsx index 9533ca3..c64dda4 100644 --- a/src/components/dashboard/NewServiceCard.jsx +++ b/src/components/dashboard/NewServiceCard.jsx @@ -4,7 +4,7 @@ export default function NewServiceCard({ onClick }) { return (
diff --git a/src/services/billing_api.js b/src/services/billing_api.js index 8df04c7..2accc99 100644 --- a/src/services/billing_api.js +++ b/src/services/billing_api.js @@ -203,15 +203,18 @@ export const changeClientPassword = (current_password, new_password) => // Souscription -// Resiliation (après 14 jours) -export const cancelRenewal = (order_id) => - apiCall(`${BASE_URL}/api/admin/order/update`, { - id: order_id, - cancel_at_expiration: 1 +// Resiliation +// Action : Demande d'annulation (S'occupe de vérifier les 14 jours côté serveur) +export const cancelOrder = (orderId) => { + // On utilise votre moteur apiCall existant, il transmettra automatiquement + // le token "Bearer" dans le header Authorization ! + return apiCall(`${CUSTOM_API_URL}/cancel_subscription.php`, 'POST', { + order_id: orderId }); +}; // Suppression -export const cancelOrder = (order_id) => +export const deleteOrder = (order_id) => apiCall(`${BASE_URL}/api/client/order/delete`, { id: order_id }); // Promotion (Surclassement)