Skip to content

Commit

Permalink
Processed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rakibabu committed Feb 26, 2024
1 parent 28256d3 commit 5bf501f
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,17 @@ define(
},

renderCheckoutComponent: function() {
this.isPlaceOrderAllowed(quote.billingAddress() != null);
let configuration = this.buildComponentConfiguration(this.paymentMethod(), this.paymentMethodsExtraInfo());

this.mountPaymentMethodComponent(this.paymentMethod(), configuration);
this.isPlaceOrderAllowed(false);
const configuration = this.buildComponentConfiguration(
this.paymentMethod(),
this.paymentMethodsExtraInfo()
);
this.mountPaymentMethodComponent(this.paymentMethod(), configuration).then(
function() {
const hasBillingAddress = quote.billingAddress() !== null
this.isPlaceOrderAllowed(hasBillingAddress);
}
);
},

buildComponentConfiguration: function (paymentMethod, paymentMethodsExtraInfo) {
Expand Down Expand Up @@ -222,14 +229,14 @@ define(
return this.item.method;
},

mountPaymentMethodComponent(paymentMethod, configuration)
mountPaymentMethodComponent: async function(paymentMethod, configuration)
{
let self = this;

try {
const containerId = '#' + paymentMethod.type + 'Container';

this.paymentComponent = adyenCheckout.mountPaymentMethodComponent(
this.paymentComponent = await adyenCheckout.mountPaymentMethodComponent(
self.checkoutComponent,
self.getTxVariant(),
configuration,
Expand Down

0 comments on commit 5bf501f

Please sign in to comment.