Commit aa496725 authored by attilak's avatar attilak

Remove input prefilling in component and add logs

parent 5635b5f8
...@@ -198,6 +198,9 @@ define( ...@@ -198,6 +198,9 @@ define(
showPayButton = true; 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 // 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 // simply skip rendering the adyen checkout component
if (!paymentMethod.details && !showPayButton) { if (!paymentMethod.details && !showPayButton) {
...@@ -220,15 +223,15 @@ define( ...@@ -220,15 +223,15 @@ define(
/*Use the storedPaymentMethod object and the custom onChange function as the configuration object together*/ /*Use the storedPaymentMethod object and the custom onChange function as the configuration object together*/
var configuration = { var configuration = {
showPayButton: showPayButton, showPayButton: showPayButton,
data: { /*data: {
billingAddress: { billingAddress: {
city: quote.shippingAddress().city, city: city,
country: quote.shippingAddress().countryId, country: country,
houseNumberOrName: '', houseNumberOrName: '',
postalCode: quote.shippingAddress().postcode, postalCode: postalCode,
street: quote.shippingAddress().street.join(" ") street: street
} }
}, },*/
onChange: function (state) { onChange: function (state) {
if (!!state.isValid) { if (!!state.isValid) {
result.stateData = state.data; result.stateData = state.data;
...@@ -240,9 +243,12 @@ define( ...@@ -240,9 +243,12 @@ define(
} }
}; };
console.log(configuration);
try { try {
self.checkoutComponent.create(result.getBrandCode(), configuration).mount('#adyen-alternative-payment-container-' + result.getBrandCode()); self.checkoutComponent.create(result.getBrandCode(), configuration).mount('#adyen-alternative-payment-container-' + result.getBrandCode());
} catch (err) { } catch (err) {
console.log(err);
// The component does not exist yet // 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