{"id":13463203,"url":"https://github.com/braintree/braintree_ruby","last_synced_at":"2025-05-13T23:04:32.284Z","repository":{"id":418553,"uuid":"442437","full_name":"braintree/braintree_ruby","owner":"braintree","description":"Braintree Ruby library","archived":false,"fork":false,"pushed_at":"2025-03-03T15:11:40.000Z","size":2933,"stargazers_count":445,"open_issues_count":10,"forks_count":200,"subscribers_count":93,"default_branch":"master","last_synced_at":"2025-04-10T19:06:36.772Z","etag":null,"topics":["braintree","payments","ruby"],"latest_commit_sha":null,"homepage":"https://developer.paypal.com/braintree/docs/start/overview","language":"Ruby","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/braintree.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-12-19T01:41:26.000Z","updated_at":"2025-03-03T15:11:44.000Z","dependencies_parsed_at":"2023-07-06T21:46:49.361Z","dependency_job_id":"51369572-a22c-4656-8c4f-e2689eb5cf85","html_url":"https://github.com/braintree/braintree_ruby","commit_stats":{"total_commits":206,"total_committers":29,"mean_commits":7.103448275862069,"dds":"0.17961165048543692","last_synced_commit":"b711fb4e69a871066f9946ce17dbbafb40a66c97"},"previous_names":[],"tags_count":181,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braintree","download_url":"https://codeload.github.com/braintree/braintree_ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251602593,"owners_count":21615956,"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":["braintree","payments","ruby"],"created_at":"2024-07-31T13:00:47.981Z","updated_at":"2025-04-29T23:41:34.694Z","avatar_url":"https://github.com/braintree.png","language":"Ruby","readme":"# Braintree Ruby library\n\nThe Braintree gem provides integration access to the Braintree Gateway.\n\n# Please Note\n**The Payment Card Industry (PCI) Council has [mandated](https://blog.pcisecuritystandards.org/migrating-from-ssl-and-early-tls) that early versions of TLS be retired from service.  All organizations that handle credit card information are required to comply with this standard. As part of this obligation, Braintree is updating its services to require TLS 1.2 for all HTTPS connections. Braintree will also require HTTP/1.1 for all connections. Please see our [technical documentation](https://github.com/paypal/tls-update) for more information.**\n\n## Installation\n\n```ruby\ngem install braintree\n```\n\nOr add to your Gemfile:\n\n```ruby\ngem 'braintree'\n```\n\nOptionally, you may also include LibXML for more performant XML parsing. If LibXML is not present, REXML will be used instead.\n\n```ruby\ngem 'libxml-ruby'\n```\n\n## Dependencies\n\n* builder\n\nThe Braintree Ruby SDK is tested against Ruby versions 2.6, 2.7 and 3.0.\n\n_The Ruby core development community has released [End-of-Life branches](https://www.ruby-lang.org/en/downloads/branches/) for Ruby versions lower than 2.6, which are no longer receiving security updates. As a result, Braintree no longer supports these versions of Ruby. **We have updated our gem specifications to reflect these updates.**_\n\n## Versions\n\u003e :warning: **The SSL certificates for Ruby SDK versions older than 4.23.0 are set to expire by June 31, 2025. If you do not update your SDK to the latest version with the updated certificates by June 31, 2025, 100% of your impacted traffic will fail**\n\nBraintree employs a deprecation policy for our SDKs. For more information on the statuses of an SDK check our [developer docs](https://developer.paypal.com/braintree/docs/reference/general/server-sdk-deprecation-policy). [Minimum supported versions](https://developer.paypal.com/braintree/docs/reference/general/best-practices/ruby#server-sdk-versions) are also available in our developer docs.\n\n| Major version number | Status      | Released      | Deprecated   | Unsupported  |\n| -------------------- | ----------- | ------------- | ------------ | ------------ |\n| 4.x.x                | Active      | May 2021      | TBA          | TBA          |\n| 3.x.x                | Deprecated  | October 2020  | May 2023     | May 2024     |\n| 2.x.x                | Deprecated  | April 2010    | October 2022 | October 2023 |\n\n## Documentation\n\n* [Official documentation](https://developer.paypal.com/braintree/docs/start/hello-server/ruby)\n\nUpdating from an Inactive, Deprecated, or Unsupported version of this SDK? Check our [Migration Guide](https://developer.paypal.com/braintree/docs/reference/general/server-sdk-migration-guide/ruby) for tips.\n\n## Quick Start Example\n\n```ruby\nrequire \"rubygems\"\nrequire \"braintree\"\n\ngateway = Braintree::Gateway.new(\n  :environment =\u003e :sandbox,\n  :merchant_id =\u003e \"your_merchant_id\",\n  :public_key =\u003e \"your_public_key\",\n  :private_key =\u003e \"your_private_key\",\n)\n\nresult = gateway.transaction.sale(\n  :amount =\u003e \"1000.00\",\n  :payment_method_nonce =\u003e nonce_from_the_client,\n  :options =\u003e {\n    :submit_for_settlement =\u003e true\n  }\n)\n\nif result.success?\n  puts \"success!: #{result.transaction.id}\"\nelsif result.transaction\n  puts \"Error processing transaction:\"\n  puts \"  code: #{result.transaction.processor_response_code}\"\n  puts \"  text: #{result.transaction.processor_response_text}\"\nelse\n  p result.errors\nend\n```\n\nYou retrieve your `merchant_id`, `public_key`, and `private_key` when [signing up](https://braintreepayments.com/get-started) for Braintree. Signing up for a sandbox account is easy, free, and instant.\n\n## Bang Methods\n\nMost methods have a bang and a non-bang version (e.g. `gateway.customer.create` and `gateway.customer.create!`).\nThe non-bang version will either return a `SuccessfulResult` or an `ErrorResult`. The bang version will either return\nthe created or updated resource, or it will raise a `ValidationsFailed` exception.\n\nExample of using non-bang method:\n\n```ruby\nresult = gateway.customer.create(:first_name =\u003e \"Josh\")\nif result.success?\n  puts \"Created customer #{result.customer.id}\"\nelse\n  puts \"Validations failed\"\n  result.errors.for(:customer).each do |error|\n    puts error.message\n  end\nend\n```\n\nExample of using bang method:\n\n```ruby\nbegin\n  customer = gateway.customer.create!(:first_name =\u003e \"Josh\")\n  puts \"Created customer #{customer.id}\"\nrescue Braintree::ValidationsFailed\n  puts \"Validations failed\"\nend\n```\n\nWe recommend using the bang methods when you assume that the data is valid and do not expect validations to fail.\nOtherwise, we recommend using the non-bang methods.\n\n## Developing (Docker)\n\nThe `Makefile` and `Dockerfile` will build an image containing the dependencies and drop you to a terminal where you can run tests.\n\n```\nmake\n```\n\n## Linting\n\nThe Rakefile includes commands to run [Rubocop](https://github.com/rubocop/rubocop). To run the linter commands use rake: `rake lint`.\n\n## Tests\n\nThe unit specs can be run by anyone on any system, but the integration specs are meant to be run against a local development\nserver of our gateway code.  These integration specs are not meant for public consumption and will likely fail if run on\nyour system. To run unit tests use rake: `rake test:unit`.\n\n## Suppress Braintree Logs\n\nTo suppress logs from Braintree on environments where they are considered noise\n(e.g. test) use the following configuration:\n\n```ruby\nlogger = Logger.new(\"/dev/null\")\nlogger.level = Logger::INFO\ngateway.config.logger = logger\n```\n\n## License\n\nSee the [LICENSE](https://github.com/braintree/braintree_ruby/blob/master/LICENSE) file for more info.\n","funding_links":["https://developer.paypal.com/braintree/docs/reference/general/server-sdk-deprecation-policy","https://developer.paypal.com/braintree/docs/reference/general/best-practices/ruby","https://developer.paypal.com/braintree/docs/start/hello-server/ruby","https://developer.paypal.com/braintree/docs/reference/general/server-sdk-migration-guide/ruby"],"categories":["E-Commerce and Payments","Ruby"],"sub_categories":["Payments"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraintree%2Fbraintree_ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraintree%2Fbraintree_ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraintree%2Fbraintree_ruby/lists"}