lib/active_merchant/billing/gateways/barclaycard_smartpay.rb in activemerchant-1.68.0 vs lib/active_merchant/billing/gateways/barclaycard_smartpay.rb in activemerchant-1.69.0

- old
+ new

@@ -4,10 +4,11 @@ self.test_url = 'https://pal-test.barclaycardsmartpay.com/pal/servlet' self.live_url = 'https://pal-live.barclaycardsmartpay.com/pal/servlet' self.supported_countries = ['AL', 'AD', 'AM', 'AT', 'AZ', 'BY', 'BE', 'BA', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'GE', 'DE', 'GR', 'HU', 'IS', 'IE', 'IT', 'KZ', 'LV', 'LI', 'LT', 'LU', 'MK', 'MT', 'MD', 'MC', 'ME', 'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'SM', 'RS', 'SK', 'SI', 'ES', 'SE', 'CH', 'TR', 'UA', 'GB', 'VA'] self.default_currency = 'EUR' + self.currencies_with_three_decimal_places = %w(BHD KWD OMR RSD TND) self.money_format = :cents self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb, :dankort, :maestro] self.homepage_url = 'https://www.barclaycardsmartpay.com/' self.display_name = 'Barclaycard Smartpay' @@ -236,12 +237,13 @@ hash[:country] = address[:country] if address[:country] hash end def amount_hash(money, currency) + currency = currency || currency(money) hash = {} - hash[:currency] = currency || currency(money) - hash[:value] = amount(money) if money + hash[:currency] = currency + hash[:value] = localized_amount(money, currency) if money hash end def credit_card_hash(creditcard) hash = {}