Minor cleanup

This commit is contained in:
Wouter Samaey 2023-03-09 09:49:23 +01:00
parent dba2213d19
commit 152d6ce58d

View File

@ -9,18 +9,13 @@ define(
defaults: {
template: 'Storefront_BTCPay/payment/btcpay'
},
redirectAfterPlaceOrder: false, // Disable the standard redirect to Magento's "Thank You" page
getMailingAddress: function () {
return window.checkoutConfig.payment.checkmo.mailingAddress;
},
getInstructions: function () {
return window.checkoutConfig.payment.instructions[this.item.method];
},
placeOrder: function (data, event) {
// Disable the standard redirect to Magento's "Thank You" page
this.redirectAfterPlaceOrder = false;
return this._super(data, event);
},
afterPlaceOrder: function () {
$.mage.redirect(window.checkoutConfig.payment.btcpay.paymentRedirectUrl);
}