Why isn't there a currency list in AM?

Skip to first unread message


Oct 17, 2008, 6:33:30 AM10/17/08
to Active Merchant

I need to translate a numeric currency number, into it's alpha
equivalent (e.g 752 => SEK), in order for my tests to pass for the
DIBS-module I'm working on. Why isn't there a currency list in AM?
I've found the countries list, but it seems to me there should be a
currency list as well. Especially since the Money gem uses the alpha
codes, not the numeric ones...

For now I will just implement a table of my own in my DIBS-module for
the currencies they support, but shouldn't this be in AM itself?


Cody Fauser

Oct 17, 2008, 10:31:07 AM10/17/08
to activem...@googlegroups.com
The numeric currency codes are very uncommon for the implemented
gateways. I think there is currently only a single ActiveMerchant
gateway that needs to perform an alpha to numeric currency code
conversion. Also, since each gateway usually only supports a couple of
currencies it is easy to just have a small hash of conversions right
in the class.

Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://peepcode.com/products/activemerchant-pdf - ActiveMerchant PeepCode
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails

Michele Nasti

Jun 24, 2017, 4:21:40 PM6/24/17
to Active Merchant
I'm new to the Ruby World and some things are confusing for me.
I see that in ruby you use symbols pretty much everywhere (:italy, :visa, ...etc) but not for currency codes. Why?
Secondly, I assume that Shopify (and other clients) are calling the library will use the 3-letters ISO code for the currency. Is it right?

To be extra-extra-clear, here is the ISO Codes for currency: https://en.wikipedia.org/wiki/ISO_4217 
Reply all
Reply to author
0 new messages