{"id":26590573,"url":"https://github.com/emcfarlane/checkout","last_synced_at":"2026-04-18T02:31:49.091Z","repository":{"id":81103885,"uuid":"284765485","full_name":"emcfarlane/checkout","owner":"emcfarlane","description":"Simple Checkout Service","archived":false,"fork":false,"pushed_at":"2020-08-04T10:43:29.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-21T00:58:19.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emcfarlane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-03T17:36:17.000Z","updated_at":"2024-06-19T12:34:30.878Z","dependencies_parsed_at":null,"dependency_job_id":"db23e9b1-155e-4f2c-a2e6-baa506a1d3b7","html_url":"https://github.com/emcfarlane/checkout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emcfarlane/checkout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fcheckout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fcheckout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fcheckout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fcheckout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emcfarlane","download_url":"https://codeload.github.com/emcfarlane/checkout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Fcheckout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-03-23T13:52:46.902Z","updated_at":"2026-04-18T02:31:49.058Z","avatar_url":"https://github.com/emcfarlane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Checkout\n===\n\nCheckout implements a simple authorization flow service.\n\n- gRPC service with HTTP bindings by [graphpb](https://github.com/emcfarlane/graphpb)\n- Postgres service with library from [go cloud cdk](https://github.com/google/go-cloud)\n\nBuild\n---\n\nBuild with go:\n```\ngo install ./checkout\n```\n\n### Protobuf (optional)\n\nProtobuffers can be rebuilt with protoc:\n```sh\nprotoc -I checkoutpb --go_out=paths=source_relative:checkoutpb --go-grpc_out=paths=source_relative:checkoutpb checkoutpb/checkout.proto\n```\nNB: Requires both go \u0026 grpc protobuf generates installed locally as well as protoc with google apis included.\n\nRun\n---\n\nRun must specify a DATABASE address.\n```\nPOSTGRES=postgres://\u003cuser\u003e:\u003cpassword\u003e@localhost/\u003cdatabase\u003e checkout\n```\nThe database URL pattern is described [here](https://gocloud.dev/howto/sql/).\n\nTest\n---\n\nUnit tests can be run:\n```\ngo test -v .\n```\n\nIntegration tests require a postgresql database connection:\n```\nPOSTGRES=postgres://\u003cuser\u003e:\u003cpassword\u003e@localhost/\u003cdatabase\u003e go test -v -tags=integration .\n```\n\nExamples\n---\n\nCreate a new authorization:\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"pan\":\"4532111111111112\",\"exp_month\":\"1\",\"exp_year\":\"2022\",\"cvv\":\"123\",\"\namount\":500,\"currency\":\"gbp\"}' localhost:8080/authorize\n```\n\nCapture an authorization:\n```\ncurl -X PATCH -H \"Content-Type: application/json\" -d '{\"id\":\"\u003cid\u003e\",\"amount\":250}' localhost:8080/capture\n```\n\nRefund an authorization:\n```\ncurl -X PATCH -H \"Content-Type: application/json\" -d '{\"id\":\"\u003cid\u003e\",\"amount\":250}' localhost:8080/refund\n```\n\nVoid an authorization:\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"id\":\"\u003cid\u003e\"}' localhost:8080/void\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Fcheckout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcfarlane%2Fcheckout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Fcheckout/lists"}