Android Open Source - bankomatinfos Iso4217 Currency Codes






From Project

Back to project page bankomatinfos.

License

The source code is released under:

GNU General Public License

If you think the Android project bankomatinfos listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package at.zweng.bankomatinfos.iso7816emv;
/*w ww  . jav a 2 s .  c  o  m*/
import static at.zweng.bankomatinfos.util.Utils.bytesToHex;

/**
 * Currency values<br>
 * <br>
 * currencies defined in ISO4217 numeric<br>
 * https://en.wikipedia.org/wiki/ISO_4217
 */
public class Iso4217CurrencyCodes {

  /**
   * @param currencyByte
   *            2-byte representation of currency
   * @return String representation of currency
   */
  public static String getCurrencyAsString(byte[] currencyCode) {
    String byteString = bytesToHex(currencyCode);
    if ("0040".equals(byteString)) {
      return "ATS";
    }
    if ("0124".equals(byteString)) {
      return "CAD";
    }
    if ("0156".equals(byteString)) {
      return "CNY";
    }
    if ("0348".equals(byteString)) {
      return "HUF";
    }
    if ("0643".equals(byteString)) {
      return "RUB";
    }
    if ("0752".equals(byteString)) {
      return "SEK";
    }
    if ("0756".equals(byteString)) {
      return "CHF";
    }
    if ("0784".equals(byteString)) {
      return "AED";
    }
    if ("0826".equals(byteString)) {
      return "GBP";
    }
    if ("0840".equals(byteString)) {
      return "USD";
    }
    if ("0941".equals(byteString)) {
      return "RSD";
    }
    if ("0946".equals(byteString)) {
      return "RON";
    }
    if ("0975".equals(byteString)) {
      return "BGN";
    }
    if ("0977".equals(byteString)) {
      return "BAM";
    }
    if ("0978".equals(byteString)) {
      return "";
    }
    if ("0980".equals(byteString)) {
      return "UAH";
    }
    if ("0985".equals(byteString)) {
      return "PLN";
    }

    // special code for "not set" or "undefined"
    if ("0999".equals(byteString)) {
      // TODO localization
      return "<currency not set>";
    }
    if ("0000".equals(byteString)) {
      return "?";
    }

    return "ISO 4217 Currency Code " + byteString;
  }

}




Java Source Code List

at.zweng.bankomatinfos.AppController.java
at.zweng.bankomatinfos.exceptions.NoSmartCardException.java
at.zweng.bankomatinfos.exceptions.TlvParsingException.java
at.zweng.bankomatinfos.iso7816emv.BERTLV.java
at.zweng.bankomatinfos.iso7816emv.ByteArrayWrapper.java
at.zweng.bankomatinfos.iso7816emv.CPLC.java
at.zweng.bankomatinfos.iso7816emv.EMVTags.java
at.zweng.bankomatinfos.iso7816emv.EmvTag.java
at.zweng.bankomatinfos.iso7816emv.EmvUtils.java
at.zweng.bankomatinfos.iso7816emv.GPTags.java
at.zweng.bankomatinfos.iso7816emv.Iso3166CountryCodes.java
at.zweng.bankomatinfos.iso7816emv.Iso4217CurrencyCodes.java
at.zweng.bankomatinfos.iso7816emv.NfcBankomatCardReader.java
at.zweng.bankomatinfos.iso7816emv.TagAndValue.java
at.zweng.bankomatinfos.iso7816emv.TagImpl.java
at.zweng.bankomatinfos.iso7816emv.TagType.java
at.zweng.bankomatinfos.iso7816emv.TagValueType.java
at.zweng.bankomatinfos.model.AbstractTransactionLogEntry.java
at.zweng.bankomatinfos.model.CardInfo.java
at.zweng.bankomatinfos.model.EmvTransactionLogEntry.java
at.zweng.bankomatinfos.model.InfoKeyValuePair.java
at.zweng.bankomatinfos.model.QuickTransactionLogEntry.java
at.zweng.bankomatinfos.ui.AboutDialogFragment.java
at.zweng.bankomatinfos.ui.ChangelogDialogFragment.java
at.zweng.bankomatinfos.ui.ListAdapterEmvTransactions.java
at.zweng.bankomatinfos.ui.ListAdapterInfos.java
at.zweng.bankomatinfos.ui.ListAdapterQuickTransactions.java
at.zweng.bankomatinfos.ui.MainActivity.java
at.zweng.bankomatinfos.ui.NfcDisabledActivity.java
at.zweng.bankomatinfos.ui.ResultActivity.java
at.zweng.bankomatinfos.ui.ResultEmvTxListFragment.java
at.zweng.bankomatinfos.ui.ResultInfosListFragment.java
at.zweng.bankomatinfos.ui.ResultLogFragment.java
at.zweng.bankomatinfos.ui.ResultQuickTxListFragment.java
at.zweng.bankomatinfos.ui.SettingsActivity.java
at.zweng.bankomatinfos.util.ChangeLog.java
at.zweng.bankomatinfos.util.CustomAlertDialog.java
at.zweng.bankomatinfos.util.Utils.java