We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 351d6fbb authored by attilak's avatar attilak

Use billing address instead of shipping address

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