{"id":13593791,"url":"https://github.com/stripe/stripe-php","last_synced_at":"2026-04-15T22:02:46.047Z","repository":{"id":1557333,"uuid":"1953386","full_name":"stripe/stripe-php","owner":"stripe","description":"PHP library for the Stripe API.    ","archived":false,"fork":false,"pushed_at":"2026-01-21T18:54:46.000Z","size":10105,"stargazers_count":3973,"open_issues_count":13,"forks_count":890,"subscribers_count":109,"default_branch":"master","last_synced_at":"2026-01-22T07:13:25.204Z","etag":null,"topics":["stripe","stripe-sdk"],"latest_commit_sha":null,"homepage":"https://stripe.com","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/stripe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2011-06-25T19:52:24.000Z","updated_at":"2026-01-21T21:13:42.000Z","dependencies_parsed_at":"2023-01-14T10:51:48.649Z","dependency_job_id":"f6063d6c-6215-4ea5-8df3-91e9c7f99c17","html_url":"https://github.com/stripe/stripe-php","commit_stats":{"total_commits":1817,"total_committers":193,"mean_commits":9.414507772020725,"dds":0.8481012658227848,"last_synced_commit":"2b237f1e5efd3a1ecd3b0d004742b8077720935a"},"previous_names":[],"tags_count":659,"template":false,"template_full_name":null,"purl":"pkg:github/stripe/stripe-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stripe","download_url":"https://codeload.github.com/stripe/stripe-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-php/sbom","scorecard":{"id":855326,"data":{"date":"2025-08-11","repo":{"name":"github.com/stripe/stripe-php","commit":"313c7e3ed6af1d6948dc4262d2b9c6ee6b30394b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7,"checks":[{"name":"Code-Review","score":8,"reason":"Found 16/18 approved changesets -- score normalized to 8","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Maintained","score":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":-1,"reason":"no dependencies found","details":null,"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/stripe/.github/SECURITY.md:1","Info: Found linked content: github.com/stripe/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/stripe/.github/SECURITY.md:1","Info: Found text in security policy: github.com/stripe/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 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-23T23:46:02.763Z","repository_id":1557333,"created_at":"2025-08-23T23:46:02.763Z","updated_at":"2025-08-23T23:46:02.763Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29092984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["stripe","stripe-sdk"],"created_at":"2024-08-01T16:01:24.625Z","updated_at":"2026-04-15T22:02:46.039Z","avatar_url":"https://github.com/stripe.png","language":"PHP","readme":"# Stripe PHP bindings\n\n[![Build Status](https://github.com/stripe/stripe-php/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-php/actions?query=branch%3Amaster)\n[![Latest Stable Version](https://poser.pugx.org/stripe/stripe-php/v/stable.svg)](https://packagist.org/packages/stripe/stripe-php)\n[![Total Downloads](https://poser.pugx.org/stripe/stripe-php/downloads.svg)](https://packagist.org/packages/stripe/stripe-php)\n[![License](https://poser.pugx.org/stripe/stripe-php/license.svg)](https://packagist.org/packages/stripe/stripe-php)\n\n\u003e [!TIP]\n\u003e Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/php).\n\nThe Stripe PHP library provides convenient access to the Stripe API from\napplications written in the PHP language. It includes a pre-defined set of\nclasses for API resources that initialize themselves dynamically from API\nresponses which makes it compatible with a wide range of versions of the Stripe\nAPI.\n\n## Requirements\n\nPHP 7.2.0 and later.\n\nNote that per our [language version support policy](https://docs.stripe.com/sdks/versioning?lang=php#stripe-sdk-language-version-support-policy), support for PHP 7.2 and 7.3 will be removed soon, so upgrade your runtime if you're able to.\n\nAdditional PHP versions will be dropped in future major versions, so upgrade to supported versions if possible.\n\n## Composer\n\nYou can install the bindings via [Composer](http://getcomposer.org/). Run the following command:\n\n```bash\ncomposer require stripe/stripe-php\n```\n\nTo use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):\n\n```php\nrequire_once 'vendor/autoload.php';\n```\n\n## Manual Installation\n\nIf you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file.\n\n```php\nrequire_once '/path/to/stripe-php/init.php';\n```\n\n## Dependencies\n\nThe bindings require the following extensions in order to work properly:\n\n- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer\n- [`json`](https://secure.php.net/manual/en/book.json.php)\n- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)\n\nIf you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.\n\n## Getting Started\n\nSimple usage looks like:\n\n```php\n$stripe = new \\Stripe\\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2');\n$customer = $stripe-\u003ecustomers-\u003ecreate([\n    'description' =\u003e 'example customer',\n    'email' =\u003e 'email@example.com',\n    'payment_method' =\u003e 'pm_card_visa',\n]);\necho $customer;\n```\n\n### Client/service patterns vs legacy patterns\n\nYou can continue to use the legacy integration patterns used prior to version [7.33.0](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#7330---2020-05-14). Review the [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) for the backwards-compatible client/services pattern changes.\n\n## Documentation\n\nSee the [PHP API docs](https://stripe.com/docs/api/?lang=php#intro).\n\n## Legacy Version Support\n\n### PHP 5.4 \u0026 5.5\n\nIf you are using PHP 5.4 or 5.5, you should consider upgrading your environment as those versions have been past end of life since September 2015 and July 2016 respectively.\nOtherwise, you can still use Stripe by downloading stripe-php v6.43.1 ([zip](https://github.com/stripe/stripe-php/archive/v6.43.1.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/6.43.1.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will work but might not support recent features we added since the version was released and upgrading PHP is the best course of action.\n\n### PHP 5.3\n\nIf you are using PHP 5.3, you should upgrade your environment as this version has been past end of life since August 2014.\nOtherwise, you can download v5.9.2 ([zip](https://github.com/stripe/stripe-php/archive/v5.9.2.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v5.9.2.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses.\n\n## Custom Request Timeouts\n\n\u003e **Note**\n\u003e We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/?lang=php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic.\n\nTo modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.\n\n```php\n// set up your tweaked Curl client\n$curl = new \\Stripe\\HttpClient\\CurlClient();\n$curl-\u003esetTimeout(10); // default is \\Stripe\\HttpClient\\CurlClient::DEFAULT_TIMEOUT\n$curl-\u003esetConnectTimeout(5); // default is \\Stripe\\HttpClient\\CurlClient::DEFAULT_CONNECT_TIMEOUT\n\necho $curl-\u003egetTimeout(); // 10\necho $curl-\u003egetConnectTimeout(); // 5\n\n// tell Stripe to use the tweaked client\n\\Stripe\\ApiRequestor::setHttpClient($curl);\n\n// use the Stripe API client as you normally would\n```\n\n## Custom cURL Options (e.g. proxies)\n\nNeed to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.\n\n```php\n// set up your tweaked Curl client\n$curl = new \\Stripe\\HttpClient\\CurlClient([CURLOPT_PROXY =\u003e 'proxy.local:80']);\n// tell Stripe to use the tweaked client\n\\Stripe\\ApiRequestor::setHttpClient($curl);\n```\n\nAlternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.\n\n### Configuring a Logger\n\nThe library does minimal logging, but it can be configured\nwith a [`PSR-3` compatible logger][psr3] so that messages\nend up there instead of `error_log`:\n\n```php\n\\Stripe\\Stripe::setLogger($logger);\n```\n\n### Accessing response data\n\nYou can access the data from the last API response on any object via `getLastResponse()`.\n\n```php\n$customer = $stripe-\u003ecustomers-\u003ecreate([\n    'description' =\u003e 'example customer',\n]);\necho $customer-\u003egetLastResponse()-\u003eheaders['Request-Id'];\n```\n\n### SSL / TLS compatibility issues\n\nStripe's API now requires that [all connections use TLS 1.2](https://stripe.com/blog/upgrading-tls). Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default. In this case, you'd get an `invalid_request_error` with the following error message: \"Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at [https://stripe.com/blog/upgrading-tls](https://stripe.com/blog/upgrading-tls).\".\n\nThe recommended course of action is to [upgrade your cURL and OpenSSL packages](https://support.stripe.com/questions/how-do-i-upgrade-my-stripe-integration-from-tls-1-0-to-tls-1-2#php) so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:\n\n```php\n$curl = new \\Stripe\\HttpClient\\CurlClient([CURLOPT_SSLVERSION =\u003e CURL_SSLVERSION_TLSv1]);\n\\Stripe\\ApiRequestor::setHttpClient($curl);\n```\n\n### Per-request Configuration\n\nFor apps that need to use multiple keys during the lifetime of a process, like\none that uses [Stripe Connect][connect], it's also possible to set a\nper-request key and/or account:\n\n```php\n$customers = $stripe-\u003ecustomers-\u003eall([],[\n    'api_key' =\u003e 'sk_test_...',\n    'stripe_account' =\u003e 'acct_...'\n]);\n\n$stripe-\u003ecustomers-\u003eretrieve('cus_123456789', [], [\n    'api_key' =\u003e 'sk_test_...',\n    'stripe_account' =\u003e 'acct_...'\n]);\n```\n\n### Configuring CA Bundles\n\nBy default, the library will use its own internal bundle of known CA\ncertificates, but it's possible to configure your own:\n\n```php\n\\Stripe\\Stripe::setCABundlePath(\"path/to/ca/bundle\");\n```\n\n### Configuring Automatic Retries\n\nThe library can be configured to automatically retry requests that fail due to\nan intermittent network problem:\n\n```php\n\\Stripe\\Stripe::setMaxNetworkRetries(2);\n```\n\n[Idempotency keys][idempotency-keys] are added to requests to guarantee that\nretries are safe.\n\n### Telemetry\n\nBy default, the library sends telemetry to Stripe regarding request latency and feature usage. These\nnumbers help Stripe improve the overall latency of its API for all users, and\nimprove popular features.\n\nYou can disable this behavior if you prefer:\n\n```php\n\\Stripe\\Stripe::setEnableTelemetry(false);\n```\n\n### How to use undocumented parameters and properties\n\nIn some cases, you might encounter parameters on an API request or fields on an API response that aren’t available in the SDKs.\nThis might happen when they’re undocumented or when they’re in preview and you aren’t using a preview SDK.\nSee [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=php#undocumented-params-and-fields) to send those parameters or access those fields.\n\n### Public Preview SDKs\n\nStripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `12.2.0-beta.2`.\nWe would love for you to try these as we incrementally release new features and improve them based on your feedback.\n\nThe public preview SDKs are a different version of the same package as the stable SDKs. These versions are appended with `-beta.X` such as `15.0.0-beta.1`. To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-dotnet/releases/) and then use it in the `composer require` command:\n\n```bash\ncomposer require stripe/stripe-php:v\u003creplace-with-the-version-of-your-choice\u003e\n```\n\n\u003e **Note**\n\u003e There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your composer.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest version of the public preview SDK.\n\nSome preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If the preview feature you are interested in has this requirement, use the function `addBetaVersion` (available only in the public preview SDKs):\n\n```php\nStripe::addBetaVersion(\"feature_beta\", \"v3\");\n```\n\n### Private Preview SDKs\n\nStripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.\n\n### Custom requests\n\n\u003e This feature is only available from version 16 of this SDK.\n\nIf you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on the StripeClient.\n\n```php\n$stripe = new \\Stripe\\StripeClient('sk_test_xyz');\n$response = $stripe-\u003erawRequest('post', '/v1/beta_endpoint', [\n  \"caveat\": \"emptor\"\n], [\n  \"stripe_version\" =\u003e \"2022-11_15\",\n]);\n// $response-\u003ebody is a string, you can call $stripe-\u003edeserialize to get a \\Stripe\\StripeObject.\n$obj = $stripe-\u003edeserialize($response-\u003ebody);\n\n// For GET requests, the params argument must be null, and you should write the query string explicitly.\n$get_response = $stripe-\u003erawRequest('get', '/v1/beta_endpoint?caveat=emptor', null, [\n  \"stripe_version\" =\u003e \"2022-11_15\",\n]);\n```\n\n## Support\n\nNew features and bug fixes are released on the latest major version of the Stripe PHP library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.\n\n## Development\n\n[Contribution guidelines for this project](CONTRIBUTING.md)\n\nWe use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`.\n\nTo get started, install [Composer][composer]. For example, on Mac OS:\n\n```bash\nbrew install composer\n```\n\nInstall dependencies:\n\n```bash\njust install\n# or: composer install\n```\n\nThe test suite depends on [stripe-mock], so make sure to fetch and run it from a\nbackground terminal ([stripe-mock's README][stripe-mock] also contains\ninstructions for installing via Homebrew and other methods):\n\n```bash\ngo install github.com/stripe/stripe-mock@latest\nstripe-mock\n```\n\nInstall dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite:\n\n```bash\njust test\n# or: ./vendor/bin/phpunit\n```\n\nOr to run an individual test file:\n\n```bash\njust test tests/Stripe/UtilTest.php\n# or: ./vendor/bin/phpunit tests/Stripe/UtilTest.php\n```\n\nUpdate bundled CA certificates from the [Mozilla cURL release][curl]:\n\n```bash\n./update_certs.php\n```\n\nThe library uses [PHP CS Fixer][php-cs-fixer] for code formatting. Code must be formatted before PRs are submitted, otherwise CI will fail. Run the formatter with:\n\n```bash\njust format\n# or: ./vendor/bin/php-cs-fixer fix -v .\n```\n\n## Attention plugin developers\n\nAre you writing a plugin that integrates Stripe and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:\n\n```php\n\\Stripe\\Stripe::setAppInfo(\"MyAwesomePlugin\", \"1.2.34\", \"https://myawesomeplugin.info\");\n```\n\nThe method should be called once, before any request is sent to the API. The second and third parameters are optional.\n\n### SSL / TLS configuration option\n\nSee the \"SSL / TLS compatibility issues\" paragraph above for full context. If you want to ensure that your plugin can be used on all systems, you should add a configuration option to let your users choose between different values for `CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.\n\n[composer]: https://getcomposer.org/\n[connect]: https://stripe.com/connect\n[curl]: http://curl.haxx.se/docs/caextract.html\n[idempotency-keys]: https://stripe.com/docs/api/?lang=php#idempotent_requests\n[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer\n[psr3]: http://www.php-fig.org/psr/psr-3/\n[stripe-mock]: https://github.com/stripe/stripe-mock\n","funding_links":[],"categories":["第三方API","PHP","第三方API Third Party APIs","配置 Configuration","Configuration","Third Party APIs","API Clients \u0026 SDKs","Table of Contents"],"sub_categories":["第三方api Third Party APIs","Third Party APIs","Official SDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstripe%2Fstripe-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-php/lists"}