mangoex
is a wrapper for the MangoPay API written in Elixir.
If available in Hex, the package can be installed as:
mangoex
to your list of dependencies in mix.exs
:def deps do
[{:mangoex, "~> 0.4.0"}]
end
mangoex
is started before your application:def application do
[applications: [:mangoex]]
end
confix.ex
for Erlang 19:config :ssl, protocol_version: :"tlsv1.2"
confix.ex
:config :mangoex,
api_base: "https://api.sandbox.mangopay.com/v2.01"
Mangoex.Client.auth("client_id", "client_pass")
body = %{
Owners: ["12341234"],
Description: "Wallet name",
Currency: "GBP"
}
result = Mangoex.Client.create_wallet(body)
case result do
{:ok, response} -> ...
{:error, error_message} -> ...
end
These are the priorities for me right now. If you want anything else feel free to add a pull request.
The mangoex
lib is released under the MIT License.