diff --git a/composer.json b/composer.json index 9d66bcf..4e84ab6 100644 --- a/composer.json +++ b/composer.json @@ -17,10 +17,10 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^8.0|^8.1", + "php": "^8.0|^8.1|^8.2", "guzzlehttp/guzzle": "^7.2", "illuminate/support": "^9.0|^10.0", - "rapidez/core": "~0.77|^1.0" + "rapidez/core": "^2.0" }, "autoload": { "psr-4": { diff --git a/resources/js/mollie.js b/resources/js/mollie.js index e1c496a..a7e76e6 100644 --- a/resources/js/mollie.js +++ b/resources/js/mollie.js @@ -1,7 +1,7 @@ document.addEventListener('turbo:load', () => { window.app.$on('checkout-credentials-saved', () => { window.app.magentoCart('get', 'mollie/payment-token').then(response => { - window.app.checkout.mollie = response.data + window.app.checkout.mollie = response }) }); @@ -10,10 +10,10 @@ document.addEventListener('turbo:load', () => { return; } window.app.checkout.doNotGoToTheNextStep = true - window.magento.post('mollie/transaction/start', { + window.magentoAPI('post', 'mollie/transaction/start', { token: window.app.checkout.mollie }).then(response => { - window.location.replace(response.data) + window.location.replace(response) }) }); })