aviabird / gringotts

A complete payment library for Elixir and Phoenix Framework
https://hexdocs.pm/gringotts/Gringotts.html
MIT License
481 stars 53 forks source link

Add Braintree gateway #164

Open doughsay opened 6 years ago

doughsay commented 6 years ago

I recently found this project and it looks great! I might want to give it a go in something I'm working on, but we use Braintree as our payment processor.

Has anyone talked about adding a Braintree gateway to gringotts yet? Are there any known hurdles to it? What would the level of effort be if I wanted to look into building it?

oyeb commented 6 years ago

Hey @doughsay, we did consider covering Braintree but found an older project that focused only on Braintree, called Braintree. I'm not aware of their roadmap but looks like they've done an excellent job in making Braintree API accessible in Elixir, but the payment processing is yet to come.

Edit: They have a module to operate on Transactions.

I don't see any hurdles to it, and with Braintree doing the majority of the XML handling it might even be easy. The effort really is only in implementing the authorize/3 function, once that's done everything else is a breeze, especially if you are familiar with Braintree's API.

Edit: Sorry for the really late reply :sweat_smile:

doughsay commented 6 years ago

I am already using that library and am (somewhat) familiar with Braintree's API. Sounds like it wouldn't be too hard to use this library to build the gringotts adapter. If nobody else beats me to it, I may attempt to do that when the time comes, but it may not be until after the summer that I start on the project that would need this.

The project I am considering this for currently only uses Braintree, but we want to also support Stripe and possibly other gateways in the future. Rather than re-implementing the same stuff again, I'd rather just switch to gringotts to keep things better organized.

Feel free to leave this issue open and I'll get back to you when I start the planning process.