verifyIfHasShippingMethodsInAllPaymentTypes: function () { var widget = this; var selectedShippingMethod = widget.cart().shippingMethod(); var shippingMethodNotAvailable = widget.paymentTypes().some(function (paymentType) { if (!(paymentType.hasOwnProperty('freights') && paymentType.freights && paymentType.freights.includes(selectedShippingMethod))) { return paymentType } }) if (!shippingMethodNotAvailable) { widget.enableAllPaymentTypes(true); } },