This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acquirer: | |
uuid: ${ACQ_UUID} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acquirer: | |
uuid: d8d821e2-732c-4b3e-958c-1471a8f3c196 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acquirer: | |
uuid: ${ACQ_UUID} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns fan.acquirer | |
(:require [schema.core :as s] | |
[io.aviso/config :as config] | |
[fan.startup :as startup) | |
(:gen-class) | |
(s/defschema ^:private AcquirerSchema | |
"When an Acquirer is set up, it is registered with the MIX, and an acquirer instance is created in the MIX database. | |
The Acquirer must reference its UUID when submitting payments." | |
{:acquirer {:uuid s/Uuid}}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lein deps :tree | |
[cc.qbits/jet "0.5.4" :exclusions [[cheshire]]] | |
[org.eclipse.jetty.websocket/websocket-client "9.2.6.v20141205"] | |
[org.eclipse.jetty/jetty-util "9.2.6.v20141205"] | |
[org.eclipse.jetty.websocket/websocket-server "9.2.6.v20141205"] | |
[org.eclipse.jetty.websocket/websocket-common "9.2.6.v20141205"] | |
[org.eclipse.jetty/jetty-servlet "9.2.6.v20141205"] | |
[org.eclipse.jetty/jetty-security "9.2.6.v20141205"] | |
[org.eclipse.jetty.websocket/websocket-servlet "9.2.6.v20141205"] | |
[org.eclipse.jetty.websocket/websocket-api "9.2.6.v20141205"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns docker-utils | |
"Utilies for starting and stopping a Postgres Docker container." | |
(:import | |
[java.io File] | |
[java.net ServerSocket]) | |
(:require | |
[io.aviso.ansi :refer [bold]] | |
[clojure.java.shell :refer [sh]] | |
[clojure.tools.logging :as l] | |
[clojure.edn :as edn] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns setup | |
(:import | |
[java.util Date Calendar TimeZone] | |
[java.sql PreparedStatement]) | |
(:require | |
[clj-time.coerce :as coerce] | |
[clojure.java.jdbc :as jdbc])) | |
(extend-type Date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn validate-auth | |
"Validates the authentication data and returns vector of [error-message user-data]. On success, the error-message will | |
be nil." | |
[db-connection user-id user-password] | |
(cond-let | |
(str/is-blank? user-id) | |
["user-id not specified"] | |
(str/is-blank? user-password) | |
["password not specified"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro cond-let | |
"A merging of cond and let. Each term is either a vector | |
(in which case, it acts like let) or a condition expression followed by the value | |
for that expression. An empty cond-let returns nil." | |
[& forms] | |
(when forms | |
(if (vector? (first forms)) | |
`(let ~(first forms) | |
(cond-let ~@(rest forms))) | |
(if-not (next forms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn validate-auth | |
"Validates the authentication data and returns vector of [error-message user-data]. On success, the error-message will | |
be nil." | |
[db-connection user-id user-password] | |
(cond | |
(str/is-blank? user-id) | |
["user-id not specified"] | |
(str/is-blank? user-password) | |
["password not specified"] |