Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:13:57+00:00 2026-06-11T11:13:57+00:00

a credit card provider needs the transaction amount in cents or smallest available unit

  • 0

a credit card provider needs the transaction amount in cents or smallest available unit of the currency. since I want the code to be portable I have to get the smallest unit of a given currency and it’s factor to the main unit. I’ve tried to get it from the locale module but i had no luck.

http://docs.python.org/library/locale.html

Example

i have a currency code as described in iso 4217

EUR for Euro

then i need 1 Euro is 100 Eurocents (only the information 1/100, no text is needed)

according to wikipedia there currencies which have more than 2 units like the old pund sterling

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:13:59+00:00Added an answer on June 11, 2026 at 11:13 am

    Alternatively cou can use following simple mapping module: http://pastebin.com/K7kVXi8P

    Save this pastebin into a module within your project (e.g. simple_currency_helper.py) and use the map (or the helper method get_currency_subunit) to get out the currency subunit for a given ISO-Code.

    >>> from simple_currency_helper import get_currency_subunit
    >>> print get_currency_subunit('TND')
    1000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While developing a credit card transaction page for a website to transmit data to
I have a UITextfield that contains a credit card number. I want to convert
We have a site in ColdFusion which integrates with a credit card provider using
My windows azure subscription has been cancelled. I want to update my credit card
Storing credit card information securely and legally is very difficult and should not be
How do I accept credit card payments inside a C# app? I'll use some
Does JQueryMobile have good support for entering credit card information. Users have a really
I'm trying to set the credit card numbers based on the standard check parameters
I am wanting to accept recurring credit card payments for some software I am
When I try to run update a credit card type by passing in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.