pkrawat1
Hey guyz
We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it.
Have a look at it in development here GitHub - aviabird/gringotts: A complete payment library for Elixir and Phoenix Framework · GitHub.
Thanks
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Introductory paragraph
I’ll be looking for a keen junior or someone that has a couple of years experience in the real world (so you’ve be...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
michalmuskala
I had a quick look at the library. I think this is an awesome project and something very needed in the community. I have some some remarks, though.
Why are floats used for money? This is a complete no-go for me since floating point arithmetic is inherently inacurate. I haven’t looked in depth if this is actually the case, but that’s what is presented in the examples.
Why is the project using GenServers in the middle? It should be perfectly enough to have “just” modules and functions. The worker process does not use the state in any way, so the only thing it does, is creating a bottleneck in the system.
AstonJ
Yup - decimals or integers.
Also worth checking out this post.
kip
There are a few libs that provide Money functions.
money,ex_moneyandmonetized(the first 3 on hex.pm) each seem to represent Money as a struct with acurrencywhich is an ISO 4217 code andamountwhich is a Decimal.It would be useful if Gringotts could support an abstraction for money types so that integration would be straight forward given than there’s a reasonable likelihood that someone using Gringotts is probably also using a Money lib. Maybe a Money protocol?
(disclaimer: I’m the author or ex_money)
sztosz
I’ll just “upvote” this, because if this library is going to use floats internally it will be unreliable. The simplest way is to just use integers and have everything in “cents”, not “dollars” (that is if you don’t need to support currencies like the old pounds divisions in UK http://projectbritain.com/moneyold.htm).
James-Byrne
What parts of the payment gateways are you targeting? Is it just plain payments or are you attempting to support Hosted Payment Pages, subscriptions, refunds, betting? Do you have a list of gateways your looking to support or some kind of roadmap?
kip
Just noting even “cents” needs care since an implied decimal place of fixed size (cents == 100) is also problematic for the 52 currencies that have no decimal places, the 6 that have 3 decimal places and the one that has 4 decimal places.
AstonJ
I had no idea such currencies exist
kip
3 decimal places: Libyan dinar, Bahraini Dinar and Omani rial
4 decimal places: Chilean unit of account (UF) which is a legal tender (Unidad de Fomento - Wikipedia)
Money stuff is fun!
NobbZ
And all those digital or cryptocurrencies? Don’t they have 6 and more decimals?
kip
ISO 4217 will probably take quite a while to catch up with those
Either way, assumptions about money need care - including the assumption of how many decimal places a given currency may have. Even ISO 4217 allows the creation of private-use codes and they can have whatever digits and rounding strategy you want.