Git Product home page Git Product logo

Comments (8)

f3l1x avatar f3l1x commented on August 20, 2024

Well, I agree. 😃

Could you prepare PR with some changes?

from gopay-inline.

jiripudil avatar jiripudil commented on August 20, 2024

Sure. What do you think would be the best approach? To kill both birds with one stone, I'd go for amount in cents as integer, but that would obviously be a huge BC break 😟 string, on the other hand, would require some math library, because the item price is multiplied by its quantity at some point

from gopay-inline.

BayerMeister avatar BayerMeister commented on August 20, 2024

This got me too. I would stick to the documentation = cents, integer. Differences make for surprises. But yes, BC is an issue => no simple solution.

from gopay-inline.

f3l1x avatar f3l1x commented on August 20, 2024

Personally I would like to have a Money object. We can prepare it for v2.0. Could you do that guys? @jiripudil @BayerMeister ?

from gopay-inline.

PavelJurasek avatar PavelJurasek commented on August 20, 2024

I could look into it and remove all occurrences of * 100 multiplications and rounding. I'm not feeling like adding a custom Money object while there are solutions like https://github.com/moneyphp/money, but adding a new dependency doesn't seem to be a fit either.

from gopay-inline.

f3l1x avatar f3l1x commented on August 20, 2024

I think we can include moneyphp?

from gopay-inline.

PavelJurasek avatar PavelJurasek commented on August 20, 2024

Should I keep it in style without return type hints and with annotations?

from gopay-inline.

f3l1x avatar f3l1x commented on August 20, 2024

I would be fine if you do. :-)

from gopay-inline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.