Method ConvertCurrencyToMinorUnits
ConvertCurrencyToMinorUnits(string, double)
Converts an amount of currency to the minor units required for the objects passed to the Transaction method. This method uses data from ISO 4217. Note that this method expects you to pass in currency in the major units for conversion - if you already have data in the minor units you don't need to call this method. For example - 1.99 USD would be converted to 199, 123 JPY would be returned unchanged.
Declaration
long ConvertCurrencyToMinorUnits(string currencyCode, double value)
Parameters
Type | Name | Description |
---|---|---|
string | currencyCode | The ISO4217 currency code for the input currency. For example, USD for dollars, or JPY for Japanese Yen |
double | value | The major unit value of currency, for example 1.99 for 1 dollar 99 cents. |
Returns
Type | Description |
---|---|
long | The minor unit value of the input currency, for example for an input of 1.99 USD 199 would be returned. |