Skip to content

Commit

Permalink
Rapidez v2 support (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Mar 5, 2024
1 parent 6ff3397 commit 1e27b71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.0|^8.1",
"php": "^8.0|^8.1|^8.2",
"illuminate/support": "^9.0|^10.0",
"rapidez/core": "^1.0"
"rapidez/core": "^2.0"
},
"config": {
"sort-packages": true
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/MSPPending.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
return;
}
magento.get(`/multisafepay/orders/${orderId}/${token}`).then(response => {
if(['processing', 'success', 'complete'].includes(response.data?.status)) {
window.magentoAPI('get', `/multisafepay/orders/${orderId}/${token}`).then(response => {
if(['processing', 'success', 'complete'].includes(response?.status)) {
useToken.value = this.token;
useMask.value = this.mask;
this.completed = true;
this.order = Object.assign({
sales_order_items: response.data.items,
sales_order_items: response.items,
sales_order_payments: [response.payment],
}, response.data)
}, response)
} else {
window.setTimeout(this.checkStatus, 2000);
}
Expand Down
4 changes: 2 additions & 2 deletions resources/js/eventlisteners.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ document.addEventListener('turbo:load', () => {
}
window.app.checkout.doNotGoToTheNextStep = true
let cart = window.app.user?.id ? 'mine' : localStorage.mask;
magentoUser.get(`/multisafepay/${cart}/payment-url/${data.order.id}`).then(response => {
window.location.replace(response.data);
window.magentoAPI('get', `multisafepay/${cart}/payment-url/${data.order.id}`).then(response => {
window.location.replace(response);
});
});
})

0 comments on commit 1e27b71

Please sign in to comment.