Skip to content

Commit

Permalink
Merge pull request #260 from synolia/feature/payment-integrated
Browse files Browse the repository at this point in the history
Integrated payment part 2
  • Loading branch information
dmurillo-payplug authored Jan 20, 2025
2 parents b01fd60 + 7f47d74 commit 38560fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/Resources/dev/shop/payment/integrated.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const IntegratedPayment = {
return;
}
if (payplug_integrated_payment_params.has_saved_cards) {
document.querySelectorAll('.payment-choice__input, .payment-item input[type=radio]').forEach((element) => {
document.querySelectorAll('.payment-choice__input, .payment-item input[type=radio]:not([name=schemeOptions])').forEach((element) => {
element.addEventListener('change', (e) => {
if (
'payplug_choice_card_other' === e.currentTarget.id && e.currentTarget.checked ||
Expand Down Expand Up @@ -121,6 +121,7 @@ const IntegratedPayment = {
});
integratedPaymentApi.onValidateForm(async ({isFormValid}) => {
if (isFormValid) {
this.toggleLoader();
const saveCardElement = document.querySelector('#savecard');
if (null !== saveCardElement) {
IntegratedPayment.options.save_card = saveCardElement.checked;
Expand Down Expand Up @@ -171,6 +172,9 @@ const IntegratedPayment = {
}
});
});
},
toggleLoader() {
document.querySelector('.payplugIntegratedPayment').querySelector('.dimmer').classList.toggle('active');
}
};

Expand Down
5 changes: 3 additions & 2 deletions src/Resources/dev/shop/payment/integrated.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 0;
position: relative;
}

&__select {
Expand Down Expand Up @@ -118,9 +119,9 @@
}

label {
margin: 0;
margin: 0 !important;
cursor: pointer;
font-size: 12px;
font-size: 12px !important;
color: #918f8f;

span {
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/assets/shop/payment/integrated.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 38560fa

Please sign in to comment.