Skip to content

Commit

Permalink
Merge pull request #512 from Adyen/bugfix/AD-390
Browse files Browse the repository at this point in the history
AD-390: Refactor stored card initialization. Update the list of compo…
  • Loading branch information
kpieloch authored Jan 23, 2025
2 parents 7a87e29 + 5388292 commit 30224ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<spring:url value="/checkout/multi/termsAndConditions" var="getTermsAndConditionsUrl"/>

<c:set var="componentsWithPayButton"
value="[amazonpay],[applepay],[paypal],[paywithgoogle],[googlepay],[pix],[bcmc_mobile],[upi],[paysafecard],[klarna],[ideal]"/>
value="[amazonpay],[applepay],[paypal],[paywithgoogle],[googlepay],[pix],[bcmc_mobile],[upi],[paysafecard],[klarna],[ideal],[trustly],[swish],[twint]"/>
<c:set var="componentPaymentMethod" value="[${selectedPaymentMethod}]" />

<%-- Components --%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ class PaymentComponentFactory {
if (storedCardList && storedCardList.length) {
for (const storedCard of storedCardList) {
const oneClickCardNode = document.getElementById("one-click-card_" + storedCard.storedPaymentMethodId);
const oneClickCard = new AdyenWeb.Card(this.checkout, {
showPayButton: false,
storedPaymentMethods: storedCard,
}).mount(oneClickCardNode);
const oneClickCard = new AdyenWeb.Card(this.checkout, {...storedCard, showPayButton: false}).mount(oneClickCardNode);
this.helper.oneClickCards[storedCard.storedPaymentMethodId] = oneClickCard;
}
}
Expand Down Expand Up @@ -581,7 +578,10 @@ class PaymentComponentFactory {
return;
}
this.helper.makePayment(state.data, component, this.helper.handleResult);
}
},
onAdditionalDetails: (state, component) => {
this.helper.submitDetails(state.data, this.helper.handleResult);
},
}).mount('#adyen-component-button-container-' + paymentMethod.label);
}

Expand Down

0 comments on commit 30224ce

Please sign in to comment.