Commit 69e32325 authored by attilak's avatar attilak

Only retrieve payment methods again when country code changed

parent c68cc30d
......@@ -71,6 +71,9 @@ define(
);
/** Add view logic here if needed */
return Component.extend({
defaults: {
countryCode: ""
},
initialize: function () {
var self = this;
......@@ -88,7 +91,10 @@ define(
}
quote.shippingAddress.subscribe(function() {
if (!!quote.shippingAddress().countryId && self.countryCode !== quote.shippingAddress().countryId) {
self.countryCode = quote.shippingAddress().countryId;
self.setAdyenPaymentMethods();
}
})
},
setAdyenPaymentMethods: function() {
......
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