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 c6733213 authored by Alexandros Moraitis's avatar Alexandros Moraitis Committed by GitHub

Fix google pay js redirect code (#877)

parent 05e0556b
...@@ -160,15 +160,15 @@ define( ...@@ -160,15 +160,15 @@ define(
*/ */
validateThreeDSOrPlaceOrder: function (responseJSON) { validateThreeDSOrPlaceOrder: function (responseJSON) {
var response = JSON.parse(responseJSON); var response = JSON.parse(responseJSON);
var googlepayRedirectUrl = '';
if (response && response.type === 'RedirectShopper') { if (response && response.type === 'RedirectShopper') {
googlepayRedirectUrl = window.checkoutConfig.payment[quote.paymentMethod().method].redirectUrl window.location.replace(url.build(
window.checkoutConfig.payment[quote.paymentMethod().method].redirectUrl
));
} else { } else {
window.location.replace(url.build( window.location.replace(url.build(
googlepayRedirectUrl = window.checkoutConfig.payment[quote.paymentMethod().method].successUrl window.checkoutConfig.payment[quote.paymentMethod().method].successUrl
)); ));
} }
window.location.replace(url.build(googlepayRedirectUrl));
}, },
isGooglePayAllowed: function () { isGooglePayAllowed: function () {
if (this.googlePayAllowed()) { if (this.googlePayAllowed()) {
......
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