aviabird / gringotts

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

Multiple Payment Processors #112

Closed mcelaney closed 6 years ago

mcelaney commented 6 years ago

Gringotts works great but I can not rely on env config vars for API information as I have a need to allow for multiple payment processors on the same project.

My thinking is to have the define a module to use for acquiring the api info in an env var - which in turn could use the env vars if desired or alternatively determine the creds through some other means.

If I make that change is it something this project is interested in or should I fork and work this as a separate project?

pkrawat1 commented 6 years ago

@mcelaney thanks for bringing this up. If I understood correctly you want to use multiple payment gateways in your application at the same time.

I am happy to inform we have implemented this and you can very well check it in out in our example repository. You can even check the demo here.

One thing I didn't understand is what is the problem with using env config for API information, at most you'll be having api_key & api_secret set as env vars and as per my limited understanding this is a very common use case why we have env vars in the first place.

Let me know if I am missing something here? You can also chat with the team on gitter

PragTob commented 6 years ago

I think this can get closed :)