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
MIT License
48 stars 10 forks source link

Braintree support #19

Open krapans opened 7 years ago

krapans commented 7 years ago

Would love to see braintree support for this.

swelham commented 7 years ago

:+1: Absolutely!

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

aseigo commented 7 years ago

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...

sorentwo commented 7 years ago

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.

swelham commented 7 years ago

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.

sorentwo commented 7 years ago

@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.

swelham commented 7 years ago

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