Packages

A CNAB file helper. This library aims to help your bank or cooperative read, decode, display, and perform various operations on a CNAB file. Supported operations: - Read CNAB240 file - Return some data

Current section

Files

Jump to
cnab lib cnab_web controllers file_controller.ex
Raw

lib/cnab_web/controllers/file_controller.ex

defmodule CnabWeb.FileController do
use Phoenix.Controller
alias Cnab.Cnab240.Services.VerifyFile
def validate_file_format(conn, params) do
{:ok, parser_file} = VerifyFile.run(params["file"])
conn
|> put_status(:ok)
|> json(parser_file)
end
end
# Padrao - C (baseado em boletos)
# Padrao - Z (baseado em auteticacao)