From f4231a7bfd45e4165bea7f0d86b6ea47e760f13a Mon Sep 17 00:00:00 2001 From: Jade Geels Date: Fri, 20 Oct 2023 08:15:40 +0200 Subject: [PATCH] Rapidez v1 checkout-success order data compatibility (#11) --- composer.json | 2 +- resources/js/components/MSPPending.vue | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 22ce91b..9840f7e 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": "^8.0|^8.1", "illuminate/support": "^9.0|^10.0", - "rapidez/core": "~0.54|^1.0" + "rapidez/core": "^1.0" }, "config": { "sort-packages": true diff --git a/resources/js/components/MSPPending.vue b/resources/js/components/MSPPending.vue index 377ae76..882dbbd 100644 --- a/resources/js/components/MSPPending.vue +++ b/resources/js/components/MSPPending.vue @@ -31,12 +31,10 @@ magento.get(`/multisafepay/orders/${orderId}/${token}`).then(response => { if(['processing', 'success', 'complete'].includes(response.data?.status)) { this.completed = true; - this.order = { - increment_id: orderId, - payment_method: response.data.payment.method, - shipping_method: response.data.shipping_description, - email: response.data.customer_email, - } + this.order = Object.assign({ + sales_order_items: response.data.items, + sales_order_payments: [response.payment], + }, response.data) } else { window.setTimeout(this.checkStatus, 2000); }