lib/active_merchant/billing/gateway.rb in activemerchant-1.35.1 vs lib/active_merchant/billing/gateway.rb in activemerchant-1.36.0
- old
+ new
@@ -159,10 +159,14 @@
end
end
def localized_amount(money, currency)
amount = amount(money)
- CURRENCIES_WITHOUT_FRACTIONS.include?(currency.to_s) ? amount.split('.').first : amount
+ non_fractional_currency?(currency) ? amount.split('.').first : amount
+ end
+
+ def non_fractional_currency?(currency)
+ CURRENCIES_WITHOUT_FRACTIONS.include?(currency.to_s)
end
def currency(money)
money.respond_to?(:currency) ? money.currency : self.default_currency
end