{"id":22196653,"url":"https://github.com/druids/clj-comgate","last_synced_at":"2025-06-30T03:36:07.572Z","repository":{"id":62431428,"uuid":"129699360","full_name":"druids/clj-comgate","owner":"druids","description":"A client for Comgate Payments","archived":false,"fork":false,"pushed_at":"2018-05-02T10:12:19.000Z","size":18,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T04:47:45.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/druids.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-16T07:02:32.000Z","updated_at":"2018-05-02T10:12:20.000Z","dependencies_parsed_at":"2022-11-01T21:00:54.889Z","dependency_job_id":null,"html_url":"https://github.com/druids/clj-comgate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/druids/clj-comgate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fclj-comgate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fclj-comgate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fclj-comgate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fclj-comgate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druids","download_url":"https://codeload.github.com/druids/clj-comgate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fclj-comgate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262704973,"owners_count":23351168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T14:16:00.214Z","updated_at":"2025-06-30T03:36:07.537Z","avatar_url":"https://github.com/druids.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"clj-comgate\n===========\n\nA client for [Comgate Payments API](https://platebnibrana.comgate.cz/cz/protokol-api).\n\n[![CircleCI](https://circleci.com/gh/druids/clj-comgate.svg?style=svg)](https://circleci.com/gh/druids/clj-comgate)\n[![Dependencies Status](https://jarkeeper.com/druids/clj-comgate/status.png)](https://jarkeeper.com/druids/clj-comgate)\n[![License](https://img.shields.io/badge/MIT-Clause-blue.svg)](https://opensource.org/licenses/MIT)\n\n\nLeiningen/Boot\n--------------\n\n```clojure\n[clj-comgate \"0.2.0\"]\n```\n\n\nDocumentation\n-------------\n\nAll functions are designed to return errors instead of throwing exceptions.\n\nAll API calls return a tuple within following structure: `[keyword response http-response]` where`keyword` can be:\n- :ok when a response is a success and parsed\n- :error when a response is parsed but it's an error response\n- :error-unmarshalling when a response is not a well formated\n\nA `response` is a parsed body of an original HTTP response.\n\nTo be able to run examples this line is needed:\n\n```clojure\n(require '[clj-comgate.core :as comgate])\n```\n\n### create-payment\n\nCreates a new payment within `opts`.\n\n```clojure\n(comgate/create-payment {:merchant \"asdf\", :secret \"qwerty\", :price 10000, ...})\n;; [:ok\n;;  {:code 0, :message \"OK\", :redirect \"https://payments.comgate.cz/...\n;;  {:request-time 386, ...\n```\n\nTo see all possible options see\n[https://platebnibrana.comgate.cz/cz/protokol-api](https://platebnibrana.comgate.cz/cz/protokol-api)\n\nExample of an error response:\n\n```clojure\n(comgate/create-payment {:merchant \"asdf\", :secret \"qwerty\", :price 10000, ...})\n;; [:error\n;;  {:code 1400, :message \"Access from unauthorized location [127.0.0.1]!\"\n;;  {:request-time 386, ...\n```\n\n### get-status\n\nReturns a status of requested payment by `opts`.\n\n```clojure\n(comgate/get-status {:merchant \"asdf\", :secret \"qwerty\", :transId \"AAAA-BBBB-CCCC\"})\n;; [:ok\n;;  {:code 0, :label \"Test label\", :message \"OK\", ...\n;;  {:request-time 386, ...\n```\n\n\n### payment-result-response-\u003emap\n\nIn case you want to handle [the push payment result](https://platebnibrana.comgate.cz/cz/protokol-api#sidemenu-link-13)\nyou can use `payment-result-response-\u003emap` to parse a request body:\n\n```clojure\n(:body request) ;; a Ring request \"merchant=merchant_com\u0026test=false\u0026price=10000...\n(comgate/payment-result-response-\u003emap (:body request)) ;; {:merchant \"merchant_com\", ...\n```\n\nWhen accepting the push request Comgate expects OK response, thus you can use `comgate/payment-result-success-response`\nfor it (it's a Ring's response).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fclj-comgate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruids%2Fclj-comgate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fclj-comgate/lists"}