{"id":22488027,"url":"https://github.com/braintree/braintree_php","last_synced_at":"2025-08-02T20:32:10.921Z","repository":{"id":822819,"uuid":"536614","full_name":"braintree/braintree_php","owner":"braintree","description":"Braintree PHP library","archived":false,"fork":false,"pushed_at":"2025-06-26T19:49:56.000Z","size":4228,"stargazers_count":553,"open_issues_count":19,"forks_count":226,"subscribers_count":98,"default_branch":"master","last_synced_at":"2025-07-08T04:40:55.629Z","etag":null,"topics":["braintree","payments","php"],"latest_commit_sha":null,"homepage":"https://developer.paypal.com/braintree/docs/start/overview","language":"PHP","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":"2010-02-26T00:46:58.000Z","updated_at":"2025-06-26T19:50:00.000Z","dependencies_parsed_at":"2024-06-18T10:41:51.062Z","dependency_job_id":"a0ba35ab-b91e-4610-ade9-4da5959479b6","html_url":"https://github.com/braintree/braintree_php","commit_stats":{"total_commits":1640,"total_committers":170,"mean_commits":9.647058823529411,"dds":"0.26707317073170733","last_synced_commit":"f46d6d570a955561f9474e0c4e5c56ca4cc22c49"},"previous_names":[],"tags_count":168,"template":false,"template_full_name":null,"purl":"pkg:github/braintree/braintree_php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braintree","download_url":"https://codeload.github.com/braintree/braintree_php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braintree%2Fbraintree_php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268448362,"owners_count":24252019,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["braintree","payments","php"],"created_at":"2024-12-06T17:17:24.993Z","updated_at":"2025-08-02T20:32:10.904Z","avatar_url":"https://github.com/braintree.png","language":"PHP","funding_links":["https://developer.paypal.com/braintree/docs/reference/general/server-sdk-deprecation-policy","https://developer.paypal.com/braintree/docs/start/hello-server/php","https://developer.paypal.com/braintree/docs/reference/general/server-sdk-migration-guide/php"],"categories":["PHP"],"sub_categories":[],"readme":"# Braintree PHP library\n\nThe Braintree PHP library provides integration access to the Braintree Gateway.\n\n## TLS 1.2 required\n\u003e **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 has updated its services to require TLS 1.2 for all HTTPS connections. Braintrees require HTTP/1.1 for all connections. Please see our [technical documentation](https://github.com/paypal/tls-update) for more information.**\n\n## Dependencies\n\nThe following PHP extensions are required:\n\n* curl\n* dom\n* hash\n* openssl\n* xmlwriter\n\nPHP version \u003e= 7.3 is required. The Braintree PHP SDK is tested against PHP versions 7.3 and 7.4, and 8.0.\n\n_The PHP core development community has released [End-of-Life branches](https://www.php.net/eol.php) for PHP versions 5.4 - 7.2, and are no longer receiving security updates. As a result, Braintree does not support these versions of PHP._\n\n## Versions\n\u003e :warning: **The SSL certificates for PHP SDK versions older than 3.27.0 are set to expire by March 30, 2026. If you do not update your SDK to the latest version with the updated certificates by March 30, 2026, 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).\n\n| Major version number | Status | Released | Deprecated | Unsupported |\n| -------------------- | ------ | -------- | ---------- | ----------- |\n| 6.x.x | Active | March 2021 | TBA | TBA |\n| 5.x.x | Inactive | March 2020 | March 2023 | March 2024 |\n| 4.x.x | Deprecated | May 2019 | March 2022 | March 2023 |\n| 3.x.x | Deprecated | May 2015 | March 2022 | March 2023 |\n\n## Documentation\n\n * [Official documentation](https://developer.paypal.com/braintree/docs/start/hello-server/php)\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/php) for tips.\n\n## Quick Start Example\n\n```php\n\u003c?php\n\nrequire_once 'PATH_TO_BRAINTREE/lib/Braintree.php';\n\n// Instantiate a Braintree Gateway either like this:\n$gateway = new Braintree\\Gateway([\n    'environment' =\u003e 'sandbox',\n    'merchantId' =\u003e 'your_merchant_id',\n    'publicKey' =\u003e 'your_public_key',\n    'privateKey' =\u003e 'your_private_key'\n]);\n\n// or like this:\n$config = new Braintree\\Configuration([\n    'environment' =\u003e 'sandbox',\n    'merchantId' =\u003e 'your_merchant_id',\n    'publicKey' =\u003e 'your_public_key',\n    'privateKey' =\u003e 'your_private_key'\n]);\n$gateway = new Braintree\\Gateway($config)\n\n// Then, create a transaction:\n$result = $gateway-\u003etransaction()-\u003esale([\n    'amount' =\u003e '10.00',\n    'paymentMethodNonce' =\u003e $nonceFromTheClient,\n    'deviceData' =\u003e $deviceDataFromTheClient,\n    'options' =\u003e [ 'submitForSettlement' =\u003e True ]\n]);\n\nif ($result-\u003esuccess) {\n    print_r(\"success!: \" . $result-\u003etransaction-\u003eid);\n} else if ($result-\u003etransaction) {\n    print_r(\"Error processing transaction:\");\n    print_r(\"\\n  code: \" . $result-\u003etransaction-\u003eprocessorResponseCode);\n    print_r(\"\\n  text: \" . $result-\u003etransaction-\u003eprocessorResponseText);\n} else {\n    foreach($result-\u003eerrors-\u003edeepAll() AS $error) {\n      print_r($error-\u003ecode . \": \" . $error-\u003emessage . \"\\n\");\n    }\n}\n```\n\n## Namespacing\n\nAs of major version 5.x.x, only PSR-4 namespacing is supported. This means you'll have to reference classes using PSR-4 namespacing:\n\n```php\n$gateway = new Braintree\\Gateway([\n    'environment' =\u003e 'sandbox',\n    'merchantId' =\u003e 'your_merchant_id',\n    'publicKey' =\u003e 'your_public_key',\n    'privateKey' =\u003e 'your_private_key'\n]);\n\n// or\n\n$config = new Braintree\\Configuration([\n    'environment' =\u003e 'sandbox',\n    'merchantId' =\u003e 'your_merchant_id',\n    'publicKey' =\u003e 'your_public_key',\n    'privateKey' =\u003e 'your_private_key'\n]);\n$gateway = new Braintree\\Gateway($config)\n```\n\n## Google App Engine Support\n\nWhen using Google App Engine include the curl extention in your `php.ini` file (see [#190](https://github.com/braintree/braintree_php/issues/190) for more information):\n\n```ini\nextension = \"curl.so\"\n```\n\nand turn off accepting gzip responses:\n\n```php\n$gateway = new Braintree\\Gateway([\n    'environment' =\u003e 'sandbox',\n    // ...\n    'acceptGzipEncoding' =\u003e false,\n]);\n```\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 [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) and [PHP Code Beautifier \u0026 Fixer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically). To run the linter commands use rake:\n\n```sh\nrake lint:fix # runs the auto-fixer first, then sniffs for any remaining code smells\nrake lint:sniff[y] # gives a detailed report of code smells\n```\n\n## Testing\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 server of our gateway code. These integration specs are not meant for public consumption and will likely fail if run on your system. To run unit tests use rake: `rake test:unit`.\n\nTo lint and run all tests, use rake: `rake test`.\n\n## License\n\nSee the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraintree%2Fbraintree_php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraintree%2Fbraintree_php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraintree%2Fbraintree_php/lists"}