Skip to content

Commit ad40e8f

Browse files
committed
MC-37820: [UX] Payment methods list is not refreshed on billing address change
1 parent 96aa6b2 commit ad40e8f

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,23 @@ function (
314314
updatePaymentMethods: function () {
315315
var payload;
316316

317-
payload = {
318-
addressInformation: {
319-
'shipping_address': quote.shippingAddress(),
320-
'billing_address': quote.billingAddress(),
321-
'shipping_method_code': quote.shippingMethod()['method_code'],
322-
'shipping_carrier_code': quote.shippingMethod()['carrier_code']
323-
}
324-
};
317+
if (quote.shippingMethod() !== null) {
318+
payload = {
319+
addressInformation: {
320+
'shipping_address': quote.shippingAddress(),
321+
'billing_address': quote.billingAddress(),
322+
'shipping_method_code': quote.shippingMethod()['method_code'],
323+
'shipping_carrier_code': quote.shippingMethod()['carrier_code']
324+
}
325+
};
326+
} else {
327+
payload = {
328+
addressInformation: {
329+
'shipping_address': quote.shippingAddress(),
330+
'billing_address': quote.billingAddress(),
331+
}
332+
};
333+
}
325334

326335
payloadExtender(payload);
327336

0 commit comments

Comments
 (0)