{"id":37089403,"url":"https://github.com/hellofresh/braintree-go","last_synced_at":"2026-01-14T10:57:55.864Z","repository":{"id":41202037,"uuid":"257835593","full_name":"hellofresh/braintree-go","owner":"hellofresh","description":"A Go client library for Braintree","archived":false,"fork":true,"pushed_at":"2025-10-07T04:52:31.000Z","size":1456,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-01T06:49:45.407Z","etag":null,"topics":["wiz-payments-payments-platform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"braintree-go/braintree-go","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellofresh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-22T08:14:00.000Z","updated_at":"2025-10-07T04:52:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hellofresh/braintree-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hellofresh/braintree-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fbraintree-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fbraintree-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fbraintree-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fbraintree-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellofresh","download_url":"https://codeload.github.com/hellofresh/braintree-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellofresh%2Fbraintree-go/sbom","scorecard":{"id":460347,"data":{"date":"2025-08-11","repo":{"name":"github.com/hellofresh/braintree-go","commit":"50b9373ff9cb1b9cd57c5726a9852c57c754f7f2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":5,"reason":"Found 10/18 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/hf_pr-dependency-review.yml:15","Warn: no topLevel permission defined: .github/workflows/hf_pr-dependency-review.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/hf_pr-dependency-review.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hellofresh/braintree-go/hf_pr-dependency-review.yml/master?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 4 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T10:57:48.643Z","repository_id":41202037,"created_at":"2025-08-19T10:57:48.644Z","updated_at":"2025-08-19T10:57:48.644Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["wiz-payments-payments-platform"],"created_at":"2026-01-14T10:57:55.117Z","updated_at":"2026-01-14T10:57:55.856Z","avatar_url":"https://github.com/hellofresh.png","language":"Go","readme":"# Braintree Go\n\n[![GoDoc](https://godoc.org/github.com/hellofresh/braintree-go?status.svg)](http://godoc.org/github.com/hellofresh/braintree-go)\n[![Build Status](https://travis-ci.com/hellofresh/braintree-go.png?branch=master)](https://travis-ci.com/hellofresh/braintree-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hellofresh/braintree-go)](https://goreportcard.com/report/github.com/hellofresh/braintree-go)\n\nA Go client library for [Braintree](https://www.braintreepayments.com), the payments company behind awesome companies like GitHub, Heroku, and 37signals.\n\nThis is *not* an official client library. Braintree maintains server-side libraries for [Ruby](https://www.github.com/braintree/braintree_ruby), [Python](https://www.github.com/braintree/braintree_python), [PHP](https://www.github.com/braintree/braintree_php), [Perl](https://www.github.com/braintree/braintree_perl), [Node](https://www.github.com/braintree/braintree_node), [C#](https://www.github.com/braintree/braintree_dotnet) and [Java](https://www.github.com/braintree/braintree_java), but not Go. This package implements the core functionality of the other client libraries, but it's missing a few advanced features.\n\nWith that said, this package contains more than enough to get you started accepting payments using Braintree. If there's a feature the other client libraries implement that you really need, open an issue (or better yet, a pull request).\n\n### Usage\n\nSetting up your credentials is easy.\n\n```go\nimport \"github.com/hellofresh/braintree-go\"\n\nbt := braintree.New(\n  braintree.Sandbox,\n  \"YOUR_BRAINTREE_MERCH_ID\",\n  \"YOUR_BRAINTREE_PUB_KEY\",\n  \"YOUR_BRAINTREE_PRIV_KEY\",\n)\n```\n\nSo is creating your first transaction.\n\n```go\nctx := context.Background()\ntx, err := bt.Transaction().Create(ctx, \u0026braintree.TransactionRequest{\n  Type: \"sale\",\n  Amount: braintree.NewDecimal(100, 2), // 100 cents\n  CreditCard: \u0026braintree.CreditCard{\n    Number:         \"4111111111111111\",\n    ExpirationDate: \"05/14\",\n  },\n})\n```\n\nThe error returned by these calls is typed. The package returns a generic error when something mechanical goes wrong, such as receiving malformed XML or being unable to connect to the Braintree gateway. However, if Braintree was able to process the request correctly, but was unable to fulfill it due to a semantic failure (such as the credit card being declined) then a `BraintreeError` type is returned.\n\nIn addition to creating transactions, you can also tokenize credit card information for repeat or subscription billing using the `CreditCard`, `Customer`, and `Subscription` types. This package is completely compatible with [Braintree.js](https://www.braintreepayments.com/braintrust/braintree-js), so if you encrypt your customers' credit cards in the browser, you can pass them on to Braintree without ever seeing them yourself. This decreases your PCI regulatory exposure and helps to secure your users' data. See the examples folder for a working implementation.\n\n### Installation\n\nThe usual. `go get github.com/hellofresh/braintree-go`\n\n### Supported Go Versions\n\n* 1.7\n* 1.8\n* 1.9\n* 1.10\n* 1.11\n* 1.12\n\n### Documentation\n\nBraintree provides a [ton of documentation](https://www.braintreepayments.com/docs/ruby/guide/overview) on how to use their API. I recommend you use the Ruby documentation when following along, as the Ruby client library is broadly similar to this one.\n\nFor details on this package, see [GoDoc](http://godoc.org/github.com/hellofresh/braintree-go).\n\n### Testing\n\nThe integration tests run against a sandbox account created in the [Braintree Sandbox](https://sandbox.braintreegateway.com/).\nSee [TESTING.md](TESTING.md) for further instructions on how to set up your sandbox for integration testing.\n\nYou can run tests locally using the same credentials that Travis CI uses by using the credentials in `.default.env`. Simply `cp .default.env .env` if you use a tool that autoloads `.env` files, or `source .default.env` to load the credentials into your shell. Then run tests with `go test -tags='unit integration' ./...`.\n\n```\nsource .default.env\ngo test -tags='unit integration' ./...\n```\n\n### Webhook Integration Testing\n\nYou can use the `WebhookTestingGateway` to write your own integration tests to verify your application is processing incoming webhook notifications correctly.\n\nA simple example:\n\n```go\npackage integration_test\n\nimport (\n  \"testing\"\n  \"net/http/httptest\"\n\n  \"github.com/hellofresh/braintree-go\"\n)\n\nfunc TestMyWebhook(t *testing.T) {\n  bt := braintree.New(\n    braintree.Sandbox,\n    \"merchaint_id\",\n    \"public_key\",\n    \"private_key\",\n  )\n\n  r, err := bt.WebhookTesting().Request(\n    braintree.SubscriptionChargedSuccessfullyWebhook,\n    \"123\", // id\n  )\n  if err != nil {\n    t.Fatal(err)\n  }\n\n  // You can now send the payload and signature to your webhook handler\n  // and test your application's busines logic\n\n  w := httptest.NewRecorder()\n  router.ServeHTTP(w, r)\n\n  // assertions\n}\n```\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Lionel Barrow\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n### Contributors\n\n- [Erik Aigner](http://github.com/eaigner)\n- [Kayle Gishen](https://github.com/kayleg)\n- [Jesse Szwedko](https://github.com/jszwedko)\n- [Leigh McCulloch](https://github.com/leighmcculloch)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellofresh%2Fbraintree-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellofresh%2Fbraintree-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellofresh%2Fbraintree-go/lists"}