Mangoex
mangoex is a wrapper for the MangoPay API written in Elixir.
Installation
If available in Hex, the package can be installed as:
-
Add
mangoexto your list of dependencies inmix.exs:
def deps do
[{:mangoex, "~> 0.4.0"}]
end-
Ensure
mangoexis started before your application:
def application do
[applications: [:mangoex]]
end-
You may need to specify the SSL protocol version in your
confix.exfor Erlang 19:
config :ssl, protocol_version: :"tlsv1.2"-
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} -> ...
endImplementation state
These are the priorities for me right now. If you want anything else feel free to add a pull request.
-
[x] Users
- [x] Create natural user
- [x] Update natural user
- [x] Create legal user
- [x] Update legal user
- [x] List users
- [x] Get eMoney values
-
[ ] Wallets
- [x] Create wallet
- [ ] Update wallet
- [x] Get wallet
-
[x] PayIns
- [x] Create bankwire direct PayIn
- [x] Create card direct PayIn
- [x] Get PayIn
- [x] PayIn Refund
-
[x] PayOuts
- [x] Create PayOut
- [x] View PayOut
-
[x] KYC
- [x] Create document
- [x] Create a KYC page
-
[x] Submit a KYC document
- [x] View document
-
[x] Transfers
- [x] Create Transfer
-
[x] BankAccounts
- [x] Create GB bank account
- [x] Create IBAN bank account
-
[x] Cards
- [x] Create card registration
- [x] Update card registration
License
The mangoex lib is released under the MIT License.