Gringotts: A complete payment library for Elixir and Phoenix Framework

Hi @pkrawat1 and team, I would like to reinforce the point above.

Using a GenServer when you don’t need one is an anti-pattern and it will actually have severe applications on the system performance, as you put all operations besides a single process which will become a bottleneck. We cover this in detail in Adopting Elixir and there is a thread about this particular topic in the forum.

Even if you may end-up using the worker for configuration, I would ask you to revisit that, because it should not be the place of libraries to impose a stateful configuration mechanism. Simply ask the users to pass the configuration every time the gateway is called. If the users of your library need to store this configuration somewhere, they can easily do so by using an Agent, application config, GenServer, etc.

11 Likes

Thanks for your feedback! yes, we realised it after @michalmuskala’s feedback!

We have been working on it and merged the PR 2 days back.

We have got rid of the worker and Gringotts does not start any application now.

4 Likes

Apologies for my at least - but probably more - 2 days late feedback. :slight_smile:

3 Likes

It’s our pleasure that we even got your attention and more importantly your feedback. We are thankful!

We are planning on adding as many as 22 new gateways in next 2 months would be exciting to have 30 to 32 gateways by June.

7 Likes

Decimal v1.5.0 has just been released with similar change: passing floats to Decimal.new is soft deprecated (no warnings emitted yet) and there is now a new function to do that explicitly: Decimal.from_float.

Thanks everyone for feedback in this thread!

3 Likes

Definitely a great move there! :smiley:

A question, does the Decimal.from_float also accept an accuracy in it? So you can tell it to only accept to 2 decimal places or so (and in what base)?

A question, does the Decimal.from_float also accept an accuracy in it?

No, it just accepts the float to convert, see: Decimal — Decimal v2.1.1.

1 Like

Release update 1.1.0

We are super excited about the release of gringotts 1.1.0.

Added

  • api: Introduces a Money protocol (#71)
  • core: Introduces Response.t (#119)
  • development: Adds a useful mix task gringotts.new (#78)
  • docs: Adds changelog, contributing guide (#117)

Changed

We are very thankful for all the awesome and super useful feedback given by you all :+1::+1::+1:

What’s next?

We are working on adding more gateways, we are expecting to have 18-20 new gateways by mid of May.

PS: We are working on something cool internally apart from gringotts and expect it to present it to you all by mid of May. :wink:

6 Likes

I noticed this library hasn’t had any commits since Oct 25, 2018, and that the demo https://gringottspay.herokuapp.com/ is no longer live. Is this no longer in development?

1 Like

@jpinnix we are taking any PR’s and issues and fixing them. Also planning some more gateways this summer. Let us know if you have any questions.

6 Likes

We may have to start using liveness advisories in the Elixir community like they do on some Clojure projects like: https://github.com/candera/causatum#liveness-advisory

2 Likes

What would be nice would be for such advisories to be in the code, so that scripts could automatically run from time to time and update curated lists of live libraries. It would solve the usual problem that especially new users have concerning which libraries are nice and current!

1 Like