Skip to content

Commit

Permalink
AD-330: Fixes for Klarna and Blik
Browse files Browse the repository at this point in the history
  • Loading branch information
kpieloch committed Jan 10, 2025
1 parent f84742b commit 5e24e51
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const adyenConfigInitialState : AdyenConfigData = {
immediateCapture: false,
openInvoiceMethods: [],
selectedPaymentMethod: "",
sessionData: undefined,
shopperLocale: "",
showBoleto: false,
showComboCard: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface PlaceOrderResponse {
executeAction?: boolean,
paymentsAction?: PaymentAction,
paymentsResponse?: PaymentResponseData,
paymentDetailsResponse?: PaymentResponseData,
error?: string,
errorFieldCodes?: string[]
orderNumber?: string
Expand Down Expand Up @@ -61,7 +62,8 @@ export class PaymentService {
success: true,
executeAction: placeOrderData.executeAction,
paymentsAction: placeOrderData.paymentsAction,
orderNumber: placeOrderData.orderNumber
orderNumber: placeOrderData.orderNumber,
paymentsResponse: placeOrderData.paymentDetailsResponse
}
})
.catch((errorResponse: AxiosError<ErrorResponse>): PlaceOrderResponse | void => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface AdyenConfigData {
adyenClientKey: string;
adyenPaypalMerchantId: string;
deviceFingerPrintUrl: string;
sessionData: SessionData;
selectedPaymentMethod: string;
showRememberTheseDetails: boolean;
checkoutShopperHost: string;
Expand All @@ -31,11 +30,6 @@ export interface AdyenConfigData {
clickToPayLocale: string,
}

interface SessionData {
id: string,
sessionData: string
}

interface StoredPaymentMethodData {
brand: string;
expiryMonth: string;
Expand Down
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]"/>
value="[amazonpay],[applepay],[paypal],[paywithgoogle],[googlepay],[pix],[bcmc_mobile],[upi],[paysafecard],[klarna],[ideal]"/>
<c:set var="componentPaymentMethod" value="[${selectedPaymentMethod}]" />

<%-- Components --%>
Expand All @@ -29,7 +29,6 @@
</div>
</c:if>
</div>

<c:choose>
<c:when test="${componentPaymentMethod eq '[pix]' || componentPaymentMethod eq '[bcmc_mobile]'}">
<%-- Render QR code --%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
const initConfig = {
shopperLocale: "${shopperLocale}",
environment: "${environmentMode}",
clientKey: "${clientKey}"
clientKey: "${clientKey}",
countryCode: "${countryCode}"
};
const paymentMethodConfigs = {};
Expand All @@ -53,7 +54,7 @@
</c:if>
<c:if test="${not empty issuerLists['ideal']}">
paymentMethodConfigs['createIdeal'] = ${issuerLists['ideal']};
paymentMethodConfigs['createIdeal'] = ${issuerLists['ideal']};
</c:if>
<c:if test="${not empty issuerLists['onlinebanking_IN']}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ class AdyenCheckoutHelper {
},
onError: (error, component) => {
console.error(error.name, error.message, error.stack, component);
},
paymentMethodsConfiguration:{
card: {
enableStoreDetails: paymentMethodConfigs.enableStoreDetails,
},
}
};
this.checkout = await AdyenWeb.AdyenCheckout(configuration);
Expand Down Expand Up @@ -227,7 +222,7 @@ class AdyenCheckoutHelper {
});
}

makePayment(data, component, handleResult, label) {
makePayment(data, component, handleResult) {
$.ajax({
url: ACC.config.encodedContextPath + '/adyen/component/payment',
type: "POST",
Expand Down
Loading

0 comments on commit 5e24e51

Please sign in to comment.