Added visualisation

Added return and cancel URL's
This commit is contained in:
2025-09-28 02:29:07 +02:00
parent bc3b86b705
commit a866801535
22 changed files with 2133 additions and 553 deletions

View File

@@ -254,7 +254,23 @@ router.get('/order-status/:wc_order_id', async (req, res) => {
total: wcOrder.order.total,
currency: wcOrder.order.currency,
payment_method: wcOrder.order.payment_method,
payment_method_title: wcOrder.order.payment_method_title
payment_method_title: wcOrder.order.payment_method_title,
line_items: wcOrder.order.line_items.map(item => ({
name: item.name,
quantity: item.quantity,
price: item.price,
total: item.total,
image: item.image?.src || null
})),
shipping: {
total: wcOrder.order.shipping_total,
method: wcOrder.order.shipping_lines[0]?.method_title
},
billing: {
first_name: wcOrder.order.billing.first_name,
last_name: wcOrder.order.billing.last_name,
email: wcOrder.order.billing.email
}
});
} catch (error) {

View File

@@ -35,7 +35,6 @@ class WooCommerceService {
async getOrder(orderId) {
try {
const response = await this.client.get(`/orders/${orderId}`);
console.log('WooCommerce Order Retrieved:', {
id: response.data.id,
status: response.data.status,