diff --git a/app/design/frontend/base/default/layout/transit.xml b/app/design/frontend/base/default/layout/transit.xml index 7e7035d..ce242d8 100644 --- a/app/design/frontend/base/default/layout/transit.xml +++ b/app/design/frontend/base/default/layout/transit.xml @@ -60,7 +60,7 @@ save_token - transit/storedcard/index + hps_transit/storedcard/index diff --git a/js/transit/checkout-form.js b/js/transit/checkout-form.js index 3ccf6b1..8ba08c1 100644 --- a/js/transit/checkout-form.js +++ b/js/transit/checkout-form.js @@ -138,28 +138,28 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"]': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-inputcard-blank@2x.png) no-repeat right', 'background-size': '50px 30px', }, '#secure-payment-field[name="cardNumber"].valid.card-type-visa': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-visa@2x.png) no-repeat top right', 'background-size': '75px 84px', }, '#secure-payment-field[name="cardNumber"].invalid.card-type-visa': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-visa@2x.png) no-repeat bottom right', 'background-size': '75px 84px', }, '#secure-payment-field[name="cardNumber"].invalid.card-type-discover': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-discover@2x.png) no-repeat right', 'background-size': '70px 74px', @@ -167,7 +167,7 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"].valid.card-type-discover': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-discover@2x.png) no-repeat right', 'background-size': '70px 74px', @@ -175,21 +175,21 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"].invalid.card-type-amex': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-input-amex@2x.png) no-repeat center right', 'background-size': '50px 55px', }, '#secure-payment-field[name="cardNumber"].valid.card-type-amex': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-inputcard-amex@2x.png) no-repeat center right', 'background-size': '50px 55px', }, '#secure-payment-field[name="cardNumber"].invalid.card-type-jcb': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-jcb@2x.png) no-repeat right', 'background-size': '75px 75px', @@ -197,7 +197,7 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"].valid.card-type-jcb': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-jcb@2x.png) no-repeat right', 'background-size': '75px 76px', @@ -205,7 +205,7 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"].invalid.card-type-mastercard': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-mastercard@2x.png) no-repeat bottom right', 'background-size': '71px', @@ -213,7 +213,7 @@ if (!String.prototype.trim) { }, '#secure-payment-field[name="cardNumber"].valid.card-type-mastercard': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/ss-saved-mastercard@2x.png) no-repeat top right', 'background-size': '71px', @@ -221,7 +221,7 @@ if (!String.prototype.trim) { }, '#secure-payment-field.card-cvv': { background: - 'transparent url(' + + 'white url(' + THIS.options.baseUrl.replace('/index.php', '') + 'skin/frontend/base/default/transit/images/cvv1.png) no-repeat right', 'background-size': '50px 30px', @@ -280,8 +280,8 @@ if (!String.prototype.trim) { return; } - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } else { alert('Unexpected error.'); } @@ -534,8 +534,8 @@ function transitMultishipping(multiForm) { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } } else if (response && response.token_value) { tokenField.value = response.token_value; @@ -653,8 +653,8 @@ Event.observe(document, 'aw_osc:onestepcheckout_form_init_before', function(e) { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } this.enablePlaceOrderButton(); this.hidePleaseWaitNotice(); @@ -781,8 +781,8 @@ document.observe('dom:loaded', function() { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } checkout.setLoadWaiting(false); } else if (response && response.token_value) { @@ -840,8 +840,8 @@ document.observe('dom:loaded', function() { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } checkout.setLoadWaiting(false); } else if (response && response.token_value) { @@ -981,8 +981,8 @@ document.observe('dom:loaded', function() { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } } else if (response && response.token_value) { tokenField.value = response.token_value; @@ -1091,8 +1091,8 @@ document.observe('dom:loaded', function() { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); } $('onestepcheckout-place-order-loading').hide(); @@ -1173,7 +1173,7 @@ document.observe('dom:loaded', function() { IWD.OPC.Checkout.hideLoader(); IWD.OPC.Checkout.xhr = null; IWD.OPC.Checkout.unlockPlaceOrder(); - alert(response.error.message); + alert(response.reasons[0].message); } else if (response && response.token_value) { tokenField.value = response.token_value; lastFourField.value = response.card.number.substr(-4); @@ -1350,8 +1350,8 @@ document.observe('dom:loaded', function() { } if (response && response.error) { - if (response.error.message) { - alert(response.error.message); + if (response.reasons && response.reasons.length > 0) { + alert(response.reasons[0].message); $ji('.iwd_opc_loader_wrapper.active').hide(); } } else if (response && response.token_value) { diff --git a/test/integration/certification/ecommerce.spec.js b/test/integration/certification/ecommerce.spec.js index 6104279..853d0af 100644 --- a/test/integration/certification/ecommerce.spec.js +++ b/test/integration/certification/ecommerce.spec.js @@ -119,9 +119,9 @@ context('Frontend - Checkout', () => { checkoutAsGuest(); enterBillingInformation(); confirmShippingMethod(); - const amexNoCvv = Object.assign({}, amex); - amexNoCvv.cvv = false; - enterPaymentInformation(amexNoCvv); + // const amexNoCvv = Object.assign({}, amex); + // amexNoCvv.cvv = false; + enterPaymentInformation(amex); placeOrder(); confirmSuccessfulCheckout(); });