swelham / cashier

Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Braintree support

krapans opened this issue · comments

Would love to see braintree support for this.

👍 Absolutely!

@aseigo is currently looking into stripe support, so this one should be next when I get time (unless someone takes it first).

There is an actively developed Braintree lib for elixir here: sorentwo/braintree-elixir

Might be a useful starting point; perhaps @sorentwo would even be interested in collaborating/ coordinating...

Hey, thanks for mentioning me. Integrating with Braintree is a bit more complex than integrating with Stripe, largely because it is all over XML. I'm available to answer any questions that come up as you work on things and coordinate, but I wouldn't want to re-implement my efforts on braintree-elixir.

Hi, I think @aseigo was more suggesting that we use your braintree-elixir lib as a dependency for the implementation in cashier. I originally intended to steer clear of taking on gateway specific dependencies, however I aim to split out the gateways into their own hex packages at which point I don't feel that will cause much of an issue.

@swelham Thanks for the clarification! Gateways sound like a good option to me. Keeping them in separate packages makes sense, though with mix/hex it is possible to declare optional dependencies and conditionally compile each gateway. If you're starting out with one or two gateways that may make testing and development simpler, with no negative impact on end users.

Awesome! I didn't know about the optional dependencies option in mix, I will definitely look into that.