Braintree (Braintree v0.13.0)
A native Braintree client library for Elixir. Only a subset of the API is supported and this is a work in progress. That said, it is already used in production, and any modules that have been implemented can be used.
For general reference please see: https://developers.braintreepayments.com/reference/overview
Link to this section Summary
Functions
Convenience function for retrieving braintree specfic environment values, but will raise an exception if values are missing.
Convenience function for setting braintree
application environment
variables.
Link to this section Functions
Link to this function
get_env(key, default \\ nil)
Convenience function for retrieving braintree specfic environment values, but will raise an exception if values are missing.
example
Example
iex> Braintree.get_env(:random_value)
** (Braintree.ConfigError) missing config for :random_value
iex> Braintree.get_env(:random_value, "random")
"random"
iex> Application.put_env(:braintree, :random_value, "not-random")
...> value = Braintree.get_env(:random_value)
...> Application.delete_env(:braintree, :random_value)
...> value
"not-random"
iex> System.put_env("RANDOM", "not-random")
...> Application.put_env(:braintree, :system_value, {:system, "RANDOM"})
...> value = Braintree.get_env(:system_value)
...> System.delete_env("RANDOM")
...> value
"not-random"
Link to this function
put_env(key, value)
Convenience function for setting braintree
application environment
variables.
example
Example
iex> Braintree.put_env(:thingy, "thing")
...> Braintree.get_env(:thingy)
"thing"