Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling big numbers #101

Open
yellow1912 opened this issue Jul 7, 2016 · 1 comment
Open

Handling big numbers #101

yellow1912 opened this issue Jul 7, 2016 · 1 comment

Comments

@yellow1912
Copy link

Omnipay, when dealing with numbers, should not use the normal methods. It should use either BCMath or GMP

http://php.net/manual/en/book.gmp.php
http://php.net/manual/en/book.bc.php

Certain low value currencies such as the Vietnam's Dong can quickly get above the total number of digits that a 32 bit PHP system can handle and thus result in very very weird errors.

Omnipay should either:

  1. Allow developers to override ALL these methods when necessary
  2. Use one of those above libs to handle big numbers
  3. Avoid getting dirty dealing with the currency amount and do not assume the amount to be integer or float.
@garak
Copy link

garak commented Jul 7, 2016

It looks like an edge-case to me. I mean, how many servers are still on 32 bit systems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants