Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key is received as param in many functions #10

Open
luispeerez opened this issue Apr 11, 2018 · 0 comments
Open

Key is received as param in many functions #10

luispeerez opened this issue Apr 11, 2018 · 0 comments

Comments

@luispeerez
Copy link
Contributor

luispeerez commented Apr 11, 2018

Hi, I have noticed that the key (API key) is required in this function make_request_with_key https://github.com/grvty-labs/ex_openpay/blob/master/lib/openpay.ex#L113

I have made a fork with a change that involves to send the API key via authorization headers encoded in Base64,

https://github.com/spaceship-labs/ex_openpay/blob/master/lib/openpay.ex#L93

it works, so I wanted to know if the main idea of the api was to send any API key when calling a function or to always use the one that is set in the config application or the system environment

Application.get_env(:ex_openpay, :api_key, System.get_env "OPENPAY_API_KEY")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant