Commit 351d6fbb authored by attilak's avatar attilak

Use billing address instead of shipping address

parent 9d870e65
...@@ -130,16 +130,15 @@ define( ...@@ -130,16 +130,15 @@ define(
}); });
self.messageComponents = messageComponents; self.messageComponents = messageComponents;
var shippingAddressCopuntryCode = quote.shippingAddress().countryId; var billingAddressCountryCode = quote.billingAddress().countryId;
console.log(shippingAddressCopuntryCode);
// subscribe to the billing address changes
quote.shippingAddress.subscribe( function(shippingAddress) { quote.billingAddress.subscribe( function(billingAddress) {
console.log(shippingAddressCopuntryCode); if (billingAddress) {
console.log(shippingAddress.countryId); if (billingAddressCountryCode != billingAddress.countryId) {
adyenPaymentService.retrieveAvailablePaymentMethods();
if (shippingAddressCopuntryCode != shippingAddress.countryId) { billingAddressCountryCode = billingAddress.countryId;
adyenPaymentService.retrieveAvailablePaymentMethods(); }
shippingAddressCopuntryCode = shippingAddress.countryId;
} }
}); });
......
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