Merge pull request #1135 from Safelite/feature/humphries/INSR-8720
INSR-8720: Fix payment-page defects
This commit is contained in:
commit
9d76548431
5 changed files with 73 additions and 211 deletions
|
|
@ -171,23 +171,38 @@ body .buttonContainer .btn-success:focus, body .buttonContainer .btn-success:act
|
|||
background-color: #0c7e47;
|
||||
box-shadow: 0 0 0 3px #ffffff, 0 0 0 5.5px #0c7e47;
|
||||
}
|
||||
body .has-error input,
|
||||
body .has-error select {
|
||||
body .has-error input.form-control,
|
||||
body .has-error select.form-control {
|
||||
border-color: #db0020;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
body .has-error input.form-control:focus,
|
||||
body .has-error select.form-control:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
body .has-error select {
|
||||
background-image: url(/icons/select-error.png);
|
||||
}
|
||||
body .has-error small {
|
||||
font-size: 1rem;
|
||||
line-height: 1.56;
|
||||
margin-bottom: 0.3125rem;
|
||||
color: #db0020;
|
||||
}
|
||||
body .has-success input,
|
||||
body .has-success select {
|
||||
body .has-success .control-label {
|
||||
color: #4d4e53;
|
||||
}
|
||||
body .has-success input.form-control,
|
||||
body .has-success select.form-control {
|
||||
border-color: #0c7e47;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
body .has-success input.form-control:focus,
|
||||
body .has-success select.form-control:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
body .has-success select {
|
||||
background-image: url(/icons/select-error.png);
|
||||
background-image: url(/icons/select-success.png);
|
||||
}
|
||||
body .cc-error-container #alert-message {
|
||||
background-color: #fcbfbb;
|
||||
|
|
@ -337,17 +352,6 @@ body .cc-error-container #alert-message {
|
|||
}
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: Glyphicons Halflings;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.form-control-feedback {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -361,11 +365,12 @@ body .cc-error-container #alert-message {
|
|||
pointer-events: none;
|
||||
top: 27px;
|
||||
}
|
||||
|
||||
.glyphicon-remove:before {
|
||||
.form-control-feedback.glyphicon {
|
||||
display: none;
|
||||
}
|
||||
.form-control-feedback.glyphicon-remove:before {
|
||||
content: "\e014";
|
||||
}
|
||||
|
||||
.glyphicon-ok:before {
|
||||
.form-control-feedback.glyphicon-ok:before {
|
||||
content: "\e013";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,95 +4,12 @@
|
|||
/* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */
|
||||
/* Style the modal when PayPal button is selected */
|
||||
#pageLoadingModal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1040;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
}
|
||||
#pageLoadingModal .modal-content {
|
||||
margin: auto auto;
|
||||
}
|
||||
#pageLoadingModal p {
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
}
|
||||
#pageLoadingModal .modal {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1040;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
#pageLoadingModal .modal-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
width: 176px;
|
||||
height: 136px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 32'%3e%3cpath d='M22.39 27.313a3.53 3.53 0 0 0 7.058 0' fill='%23fff'/%3e%3cpath d='M22.39 27.313a3.53 3.53 0 0 0 7.058 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M54.459 27.313a3.527 3.527 0 0 0 7.054 0' fill='%23fff'/%3e%3cpath d='M54.459 27.313a3.527 3.527 0 0 0 7.054 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M42.06.8c8.08 0 11.89.935 11.89.935 3.58.576 5.696 7.207 5.696 7.207h.727c0-2.427 1.302-2.397 2.341-2 .723.292 1.363.76 1.86 1.361 1.319 1.547.465 1.674.465 1.674h-5.067l3.846 3.01v12.016c0 2.41-2.029 2.31-2.029 2.31H22.338s-2.029.1-2.029-2.31V12.996l3.84-3.009H19.07s-.853-.127.466-1.674a4.693 4.693 0 0 1 1.86-1.361c1.032-.397 2.341-.427 2.341 2h.736s2.117-6.64 5.696-7.21c0 0 3.81-.942 11.89-.942Z' fill='%23fff' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M42.06 8.847c7.924 0 14.685.511 14.685.511 0-2.585-2.38-6.011-2.38-6.011S50.4 2.519 42.06 2.519s-12.303.828-12.303.828-2.38 3.426-2.38 6.011c0 0 6.76-.51 14.683-.51Z' fill='%23DA291C' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M35.277 16.523a62.558 62.558 0 0 1 13.277 0m3.276-.439s2.384-2.257 8.608-2.257c0 0 1.179 2.657-2.54 3.37m-25.894-1.113s-2.387-2.257-8.611-2.257c0 0-1.16 2.579 2.543 3.37m-3.546 5.856s21.52 3.647 39.123 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 96px;
|
||||
}
|
||||
#pageLoadingModal .modal-content:after {
|
||||
content: "";
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
width: 5.5rem;
|
||||
height: 5.5rem;
|
||||
border: 0.45em solid #d4281c;
|
||||
border-right-color: transparent;
|
||||
animation: spinnerrotate 0.75s linear infinite;
|
||||
}
|
||||
@keyframes spinnerrotate {
|
||||
0% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
#pageLoadingModal .modal-content p {
|
||||
display: none;
|
||||
}
|
||||
#pageLoadingModal .modal-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background-color: #000000;
|
||||
}
|
||||
#pageLoadingModal .modal-backdrop.fade {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
#pageLoadingModal.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.buy-backdrop {
|
||||
background-color: rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
.buy-backdrop #afterpay__iframe-checkout-container {
|
||||
width: 100%;
|
||||
}
|
||||
.buy-backdrop #afterpay__iframe-checkout-container .style_closeWrapper__lIHJe {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,12 +198,20 @@ body {
|
|||
.has-error {
|
||||
input,
|
||||
select {
|
||||
border-color: #db0020;
|
||||
&.form-control {
|
||||
border-color: #db0020;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
select {
|
||||
background-image: url(/icons/select-error.png);
|
||||
}
|
||||
small {
|
||||
font-size: 1rem;
|
||||
line-height: 1.56;
|
||||
margin-bottom: .3125rem;
|
||||
color: #db0020;
|
||||
}
|
||||
|
|
@ -211,9 +219,18 @@ body {
|
|||
|
||||
|
||||
.has-success {
|
||||
.control-label {
|
||||
color: #4d4e53
|
||||
}
|
||||
input,
|
||||
select {
|
||||
border-color: #0c7e47;
|
||||
&.form-control {
|
||||
border-color: #0c7e47;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
select {
|
||||
background-image: url(/icons/select-success.png);
|
||||
|
|
@ -442,17 +459,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: Glyphicons Halflings;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.form-control-feedback {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -465,10 +471,13 @@ body {
|
|||
text-align: center;
|
||||
pointer-events: none;
|
||||
top: 27px;
|
||||
}
|
||||
.glyphicon-remove:before {
|
||||
content: "\e014";
|
||||
}
|
||||
.glyphicon-ok:before {
|
||||
content: "\e013";
|
||||
&.glyphicon {
|
||||
display: none;
|
||||
}
|
||||
&.glyphicon-remove:before {
|
||||
content: "\e014";
|
||||
}
|
||||
&.glyphicon-ok:before {
|
||||
content: "\e013";
|
||||
}
|
||||
}
|
||||
|
|
@ -5,89 +5,7 @@
|
|||
|
||||
/* Style the modal when PayPal button is selected */
|
||||
#pageLoadingModal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1040;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.40);
|
||||
display: flex;
|
||||
|
||||
.modal-content {
|
||||
margin: auto auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1040;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
width: 176px;
|
||||
height: 136px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 32'%3e%3cpath d='M22.39 27.313a3.53 3.53 0 0 0 7.058 0' fill='%23fff'/%3e%3cpath d='M22.39 27.313a3.53 3.53 0 0 0 7.058 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M54.459 27.313a3.527 3.527 0 0 0 7.054 0' fill='%23fff'/%3e%3cpath d='M54.459 27.313a3.527 3.527 0 0 0 7.054 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M42.06.8c8.08 0 11.89.935 11.89.935 3.58.576 5.696 7.207 5.696 7.207h.727c0-2.427 1.302-2.397 2.341-2 .723.292 1.363.76 1.86 1.361 1.319 1.547.465 1.674.465 1.674h-5.067l3.846 3.01v12.016c0 2.41-2.029 2.31-2.029 2.31H22.338s-2.029.1-2.029-2.31V12.996l3.84-3.009H19.07s-.853-.127.466-1.674a4.693 4.693 0 0 1 1.86-1.361c1.032-.397 2.341-.427 2.341 2h.736s2.117-6.64 5.696-7.21c0 0 3.81-.942 11.89-.942Z' fill='%23fff' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M42.06 8.847c7.924 0 14.685.511 14.685.511 0-2.585-2.38-6.011-2.38-6.011S50.4 2.519 42.06 2.519s-12.303.828-12.303.828-2.38 3.426-2.38 6.011c0 0 6.76-.51 14.683-.51Z' fill='%23DA291C' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M35.277 16.523a62.558 62.558 0 0 1 13.277 0m3.276-.439s2.384-2.257 8.608-2.257c0 0 1.179 2.657-2.54 3.37m-25.894-1.113s-2.387-2.257-8.611-2.257c0 0-1.16 2.579 2.543 3.37m-3.546 5.856s21.52 3.647 39.123 0' stroke='%23000' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 96px;
|
||||
&:after {
|
||||
content: '';
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
width: 5.5rem;
|
||||
height: 5.5rem;
|
||||
border: 0.45em solid #d4281c;
|
||||
border-right-color: transparent;
|
||||
animation: spinnerrotate 0.75s linear infinite;
|
||||
}
|
||||
@keyframes spinnerrotate {
|
||||
0% { transform: rotate(0)}
|
||||
100% { transform: rotate(360deg)}
|
||||
}
|
||||
p {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background-color: #000000;
|
||||
&.fade {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
}
|
||||
|
||||
&.hide {
|
||||
display: none;
|
||||
}
|
||||
display: none;
|
||||
}
|
||||
|
||||
// AfterPay Styles
|
||||
|
|
@ -95,7 +13,6 @@
|
|||
.buy-backdrop {
|
||||
background-color: rgba(0,0,0,.8)!important;
|
||||
#afterpay__iframe-checkout-container {
|
||||
width: 100%;
|
||||
.style_closeWrapper__lIHJe {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ export default {
|
|||
const paymentType = useMainStore().order.payment.paymentMethod;
|
||||
const alertToDisplay = to.query[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT];
|
||||
if (paymentType === paymentMethods.PAYPAL || alertToDisplay) {
|
||||
useMainStore().savePaymentMethodChoice(paymentMethods.CREDIT_CARD);
|
||||
useMainStore().savePaymentMethodChoice(paymentMethods.PayNow);
|
||||
}
|
||||
|
||||
// Call APIs
|
||||
|
|
@ -535,7 +535,9 @@ export default {
|
|||
displayAmount: this.getDisplayAmountDue(),
|
||||
payInAdvanceLineItems: '',
|
||||
shouldBlockInteraction: false,
|
||||
afterpayModalOpen: false
|
||||
afterpayModalOpen: false,
|
||||
iframeLoaded: false,
|
||||
iframeResizerLoaded: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -776,6 +778,7 @@ export default {
|
|||
} else {
|
||||
iframe.contentWindow.postMessage('CreditCardChosen', '*');
|
||||
}
|
||||
this.iframeLoaded = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -788,6 +791,7 @@ export default {
|
|||
}
|
||||
|
||||
if (event.data.includes('afterpayClosed')) {
|
||||
this.allowIFrameResize(iframe);
|
||||
if (this.isAfterPay) {
|
||||
this.backButtonAction();
|
||||
} else {
|
||||
|
|
@ -810,7 +814,6 @@ export default {
|
|||
useMainStore().savePaymentMethodChoice(paymentMethods.AFTERPAY);
|
||||
}
|
||||
if (event.data.includes('applepayOpened')) {
|
||||
this.showIssLoadingModal(true);
|
||||
useMainStore().savePaymentMethodChoice(paymentMethods.APPLEPAY);
|
||||
}
|
||||
if (event.data.includes('showLoaderForPaypal')) {
|
||||
|
|
@ -855,17 +858,28 @@ export default {
|
|||
},
|
||||
submitPaymentAction() {
|
||||
const iframe = this.$refs.paymentFrame;
|
||||
if (iframe && iframe.contentWindow) {
|
||||
if (iframe && iframe.contentWindow && this.iframeLoaded) {
|
||||
iframe.contentWindow.postMessage('submitPayment', '*');
|
||||
}
|
||||
},
|
||||
switchToAfterPay() {
|
||||
const iframe = this.$refs.paymentFrame;
|
||||
if (iframe && iframe.contentWindow) {
|
||||
if (iframe && iframe.contentWindow && this.iframeLoaded) {
|
||||
this.afterpayModalOpen = true;
|
||||
this.lockIFrameSize(iframe);
|
||||
iframe.contentWindow.postMessage('afterpay-switch', '*');
|
||||
}
|
||||
},
|
||||
lockIFrameSize(iframe) {
|
||||
if (iframe && iframe.iFrameResizer) {
|
||||
iframe.iFrameResizer.removeListeners();
|
||||
}
|
||||
},
|
||||
allowIFrameResize(iframe) {
|
||||
if (iframe) {
|
||||
iframeResize({ checkOrigin: false }, iframe);
|
||||
}
|
||||
},
|
||||
showIssLoadingModal
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue