We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit aa496725 authored by attilak's avatar attilak

Remove input prefilling in component and add logs

parent 5635b5f8
......@@ -198,6 +198,9 @@ define(
showPayButton = true;
}
console.log(paymentMethod.type);
console.log(paymentMethod.details);
// If the details are empty and the pay button does not needs to be rendered by the component
// simply skip rendering the adyen checkout component
if (!paymentMethod.details && !showPayButton) {
......@@ -220,15 +223,15 @@ define(
/*Use the storedPaymentMethod object and the custom onChange function as the configuration object together*/
var configuration = {
showPayButton: showPayButton,
data: {
/*data: {
billingAddress: {
city: quote.shippingAddress().city,
country: quote.shippingAddress().countryId,
city: city,
country: country,
houseNumberOrName: '',
postalCode: quote.shippingAddress().postcode,
street: quote.shippingAddress().street.join(" ")
postalCode: postalCode,
street: street
}
},
},*/
onChange: function (state) {
if (!!state.isValid) {
result.stateData = state.data;
......@@ -240,9 +243,12 @@ define(
}
};
console.log(configuration);
try {
self.checkoutComponent.create(result.getBrandCode(), configuration).mount('#adyen-alternative-payment-container-' + result.getBrandCode());
} catch (err) {
console.log(err);
// The component does not exist yet
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment