We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 5fe63a07 authored by rikt's avatar rikt

remove unused method called continueToAdyen and fix javascript error if...

remove unused method called continueToAdyen and fix javascript error if window.ApplePaySession does not exists important fix as this will result in javascript errors on non safari browsers
parent 96ca7f67
......@@ -145,6 +145,7 @@ define(
isApplePayAllowed: function () {
var self = this;
if (!!window.ApplePaySession) {
// validate if applepay is allowed, it will be picked up by the isApplePayVisible method
var promise = window.ApplePaySession.canMakePaymentsWithActiveCard(self.getMerchantIdentifier());
promise.then(function (canMakePayments) {
......@@ -152,9 +153,11 @@ define(
canMakeApplePayPayments(true);
});
if (window.ApplePaySession && window.ApplePaySession.supportsVersion(applePayVersion) ) {
if (window.ApplePaySession && window.ApplePaySession.supportsVersion(applePayVersion)) {
return true;
}
}
return false;
},
performValidation: function (validationURL) {
......@@ -191,10 +194,10 @@ define(
}
);
},
isApplePayVisible: function() {
isApplePayVisible: function () {
return canMakeApplePayPayments();
},
getMerchantIdentifier: function() {
getMerchantIdentifier: function () {
return window.checkoutConfig.payment.adyen_apple_pay.merchant_identifier;
}
});
......
......@@ -518,13 +518,6 @@ define(
}
});
},
/** Redirect to adyen */
continueToAdyen: function () {
if (this.validate() && additionalValidators.validate()) {
this.placeRedirectOrder(this.getData());
return false;
}
},
continueToAdyenBrandCode: function () {
// set payment method to adyen_hpp
var self = this;
......@@ -616,7 +609,9 @@ define(
fullScreenLoader.stopLoader();
}
).done(
function () {
function (orderId) {
// todo: redirect directly to HPP
debugger;
self.afterPlaceOrder();
$.mage.redirect(
window.checkoutConfig.payment[quote.paymentMethod().method].redirectUrl
......
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