BepaidEx v0.9.1 Bepaid.Gateway
Utility module for the bePaid API
Provides API wrapper functions for remote API.
Examples:
iex> {"uid" => uid} = Gateway.put_authorization(%Payment{amount: 10})
%{...}
iex> Gateway.void_authorization(uid, 10)
%{...}
iex> {"uid" => uid} = Gateway.put_charge(%Payment{amount: 10})
%{...}
Link to this section Summary
Functions
Callback implementation for Bepaid.GatewayBehaviour.exec/2
Executes API request to bePaid API server. Accepts :get
or :post
atom as a first argument
Load transaction: https://docs.bepaid.by/ru/gateway/transactions/query
Wrapper for exec(:post, url, params). Handy for piping
Put authorization: https://docs.bepaid.by/ru/beyag/transactions/authorization
Put charge: https://docs.bepaid.by/ru/gateway/transactions/payment
Callback implementation for Bepaid.GatewayBehaviour.put_refund/1
Put refund: https://docs.bepaid.by/ru/gateway/transactions/refund
Void authorization: https://docs.bepaid.by/ru/gateway/transactions/void
Link to this section Functions
Callback implementation for Bepaid.GatewayBehaviour.exec/2
.
Executes API request to bePaid API server. Accepts :get
or :post
atom as a first argument.
Returns {:ok, data}
or {:error, error, data}
.
Load transaction: https://docs.bepaid.by/ru/gateway/transactions/query
Accepts UID of payment or authorization transaction.
Wrapper for exec(:post, url, params). Handy for piping.
Put authorization: https://docs.bepaid.by/ru/beyag/transactions/authorization
Accepts Payment
struct with credit card and customer info.
Put charge: https://docs.bepaid.by/ru/gateway/transactions/payment
Accepts Payment
struct with credit card and customer info.
Callback implementation for Bepaid.GatewayBehaviour.put_refund/1
.
Put refund: https://docs.bepaid.by/ru/gateway/transactions/refund
Accepts UID of transaction, amount in cents and reason (optionally).
Void authorization: https://docs.bepaid.by/ru/gateway/transactions/void
Accepts UID of authorization transaction and amount in cents.