We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 304dfd02 authored by rikt's avatar rikt

[PW-1330] only log onError as onComplete will always be executed

parent 6bd4f125
......@@ -37,10 +37,9 @@ define(
'Magento_Paypal/js/action/set-payment-method',
'Magento_Checkout/js/action/select-payment-method',
'Adyen_Payment/js/threeds2-js-utils',
'Adyen_Payment/js/model/threeds2',
'mage/translate'
'Adyen_Payment/js/model/threeds2'
],
function ($, ko, Component, customer, creditCardData, additionalValidators, quote, installments, url, VaultEnabler, urlBuilder, storage, fullScreenLoader, setPaymentMethodAction, selectPaymentMethodAction, threeDS2Utils, threeds2, $t) {
function ($, ko, Component, customer, creditCardData, additionalValidators, quote, installments, url, VaultEnabler, urlBuilder, storage, fullScreenLoader, setPaymentMethodAction, selectPaymentMethodAction, threeDS2Utils, threeds2) {
'use strict';
......@@ -220,15 +219,12 @@ define(
threeds2.processThreeDS2(result.data).done(function (responseJSON) {
self.validateThreeDS2OrPlaceOrder(responseJSON)
}).error(function () {
self.isPlaceOrderActionAllowed(true);
fullScreenLoader.stopLoader();
});
},
onError: function () {
self.isPlaceOrderActionAllowed(true);
fullScreenLoader.stopLoader();
this.messageContainer.addErrorMessage({
message: $t('Something went wrong. Please try again.')
});
onError: function (error) {
console.log(JSON.stringify(error));
}
});
......@@ -259,16 +255,12 @@ define(
self.validateThreeDS2OrPlaceOrder(responseJSON);
}).error(function () {
popupModal.modal("closeModal");
self.isPlaceOrderActionAllowed(true);
fullScreenLoader.stopLoader();
});
},
onError: function () {
fullScreenLoader.stopLoader();
self.isPlaceOrderActionAllowed(true);
this.messageContainer.addErrorMessage({
message: $t('Something went wrong. Please try again.')
});
onError: function (error) {
cconsole.log(JSON.stringify(error));
}
});
self.threeDS2ChallengeComponent.mount(threeDS2Node);
......
......@@ -39,10 +39,9 @@ define(
'Magento_Checkout/js/model/url-builder',
'mage/storage',
'Magento_Checkout/js/action/place-order',
'Adyen_Payment/js/model/threeds2',
'mage/translate'
'Adyen_Payment/js/model/threeds2'
],
function (ko, _, $, Component, selectPaymentMethodAction, additionalValidators, quote, checkoutData, redirectOnSuccessAction, layout, Messages, url, threeDS2Utils, fullScreenLoader, setPaymentMethodAction, urlBuilder, storage, placeOrderAction, threeds2, $t) {
function (ko, _, $, Component, selectPaymentMethodAction, additionalValidators, quote, checkoutData, redirectOnSuccessAction, layout, Messages, url, threeDS2Utils, fullScreenLoader, setPaymentMethodAction, urlBuilder, storage, placeOrderAction, threeds2) {
'use strict';
......@@ -304,8 +303,7 @@ define(
'screen_color_depth': browserInfo.colorDepth,
'screen_width': browserInfo.screenWidth,
'screen_height': browserInfo.screenHeight,
'timezone_offset': browserInfo.timeZoneOffset,
'language': browserInfo.language
'timezone_offset': browserInfo.timeZoneOffset
}
};
return data;
......@@ -358,15 +356,12 @@ define(
threeds2.processThreeDS2(result.data).done(function (responseJSON) {
self.validateThreeDS2OrPlaceOrder(responseJSON)
}).error(function () {
self.isPlaceOrderActionAllowed(true);
fullScreenLoader.stopLoader();
});
},
onError: function () {
fullScreenLoader.stopLoader();
self.isPlaceOrderActionAllowed(true);
self.getMessageContainer().addErrorMessage({
message: $t('Something went wrong. Please try again.')
});
onError: function (error) {
console.log(JSON.stringify(error));
}
});
} else if (type == "ChallengeShopper") {
......@@ -392,15 +387,12 @@ define(
threeds2.processThreeDS2(result.data).done(function (responseJSON) {
self.validateThreeDS2OrPlaceOrder(responseJSON)
}).error(function () {
self.isPlaceOrderActionAllowed(true);
fullScreenLoader.stopLoader();
});
},
onError: function () {
fullScreenLoader.stopLoader();
self.isPlaceOrderActionAllowed(true);
self.getMessageContainer().addErrorMessage({
message: $t('Something went wrong. Please try again.')
});
onError: function (error) {
console.log(JSON.stringify(error));
}
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment