Skip to content
Elixir wrapper for the MangoPay API
Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Initial commit Dec 6, 2016
lib build headers with idempotency if provided Dec 5, 2017
test Added behaviour for client interface and remove redundant tests. Jun 22, 2017
.gitignore Add more endpoints Dec 8, 2016
README.md Bump version Sep 12, 2018
mix.exs Bump version Sep 12, 2018
mix.lock Move to using HTTPoison Nov 7, 2017

README.md

Mangoex

mangoex is a wrapper for the MangoPay API written in Elixir.

Installation

If available in Hex, the package can be installed as:

  1. Add mangoex to your list of dependencies in mix.exs:
def deps do
  [{:mangoex, "~> 0.4.0"}]
end
  1. Ensure mangoex is started before your application:
def application do
  [applications: [:mangoex]]
end
  1. You may need to specify the SSL protocol version in your confix.ex for Erlang 19:
config :ssl, protocol_version: :"tlsv1.2"
  1. Add api_base config to you confix.ex:
config :mangoex,
  api_base: "https://api.sandbox.mangopay.com/v2.01"

Usage

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

Implementation state

These are the priorities for me right now. If you want anything else feel free to add a pull request.

  • Users
    • Create natural user
    • Update natural user
    • Create legal user
    • Update legal user
    • List users
    • Get eMoney values
  • Wallets
    • Create wallet
    • Update wallet
    • Get wallet
  • PayIns
    • Create bankwire direct PayIn
    • Create card direct PayIn
    • Get PayIn
    • PayIn Refund
  • PayOuts
    • Create PayOut
    • View PayOut
  • KYC
    • Create document
    • Create a KYC page
    • Submit a KYC document
      • View document
  • Transfers
    • Create Transfer
  • BankAccounts
    • Create GB bank account
    • Create IBAN bank account
  • Cards
    • Create card registration
    • Update card registration

License

The mangoex lib is released under the MIT License.

You can’t perform that action at this time.