lib/active_merchant/billing/integrations/gestpay/notification.rb in activemerchant-1.4.2 vs lib/active_merchant/billing/integrations/gestpay/notification.rb in activemerchant-1.5.0
- old
+ new
@@ -24,10 +24,12 @@
def gross
params['PAY1_AMOUNT']
end
def currency
- CURRENCY_MAPPING.index(params['PAY1_UICCODE'])
+ # Ruby 1.9 compat
+ method = CURRENCY_MAPPING.respond_to?(:key) ? :key : :index
+ CURRENCY_MAPPING.send(method, params['PAY1_UICCODE'])
end
def test?
false
end