Skip to content

Commit

Permalink
add changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slogsdon committed Dec 16, 2020
1 parent 3a12b39 commit fc17ce3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion app/design/frontend/base/default/layout/transit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<reference name="customer_account_navigation">
<action method="addLink" ifconfig="payment/hps_transit/active">
<name>save_token</name>
<path>transit/storedcard/index</path>
<path>hps_transit/storedcard/index</path>
<label>Manage Cards</label>
</action>
</reference>
Expand Down
58 changes: 29 additions & 29 deletions js/transit/checkout-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,90 +138,90 @@ 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/[email protected]) 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/[email protected]) 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/[email protected]) 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/[email protected]) no-repeat right',
'background-size': '70px 74px',
'background-position-y': '-35px',
},
'#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/[email protected]) no-repeat right',
'background-size': '70px 74px',
'background-position-y': '2px',
},
'#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/[email protected]) 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/[email protected]) 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/[email protected]) no-repeat right',
'background-size': '75px 75px',
'background-position-y': '10px -35px',
},
'#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/[email protected]) no-repeat right',
'background-size': '75px 76px',
'background-position-y': '10px 2px',
},
'#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/[email protected]) no-repeat bottom right',
'background-size': '71px',
'background-position-y': '-35px',
},
'#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/[email protected]) no-repeat top right',
'background-size': '71px',
'background-position-y': '3px',
},
'#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',
Expand Down Expand Up @@ -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.');
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions test/integration/certification/ecommerce.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit fc17ce3

Please sign in to comment.