PHPackages                             snipershady/paypalhttp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. snipershady/paypalhttp

ActiveLibrary[Payment Processing](/categories/payments)

snipershady/paypalhttp
======================

Fork of offical paypalhttp, compliant with php 8.4

v1.0.2(5mo ago)01MITPHPPHP &gt;=8.2

Since Jan 13Pushed 5mo agoCompare

[ Source](https://github.com/snipershady/paypalhttp_php_84)[ Packagist](https://packagist.org/packages/snipershady/paypalhttp)[ RSS](/packages/snipershady-paypalhttp/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Deprecation Notice:
===================

[](#deprecation-notice)

This SDK is deprecated; you can continue to use it, but no new features or support requests will be accepted. An integration with [the new Server SDK](https://github.com/paypal/PayPal-Server-SDKs) is recommended. Review the [docs](https://developer.paypal.com/serversdk/http/getting-started/how-to-get-started/) for details.

PayPal HttpClient
-----------------

[](#paypal-httpclient)

PayPalHttp is a generic HTTP Client.

In it's simplest form, an [`HttpClient`](lib/PayPalHttp/HttpClient.php) exposes an `execute` method which takes an [HTTP request](lib/PayPalHttp/HttpRequest.php), executes it against the domain described in an [Environment](lib/PayPalHttp/Environment.php), and returns an [HTTP response](lib/PayPalHttp/HttpResponse.php).

### Environment

[](#environment)

An [`Environment`](./lib/PayPalHttp/environment.rb) describes a domain that hosts a REST API, against which an `HttpClient` will make requests. `Environment` is a simple interface that wraps one method, `baseUrl`.

```
$env = new Environment('https://example.com');
```

### Requests

[](#requests)

HTTP requests contain all the information needed to make an HTTP request against the REST API. Specifically, one request describes a path, a verb, any path/query/form parameters, headers, attached files for upload, and body data.

### Responses

[](#responses)

HTTP responses contain information returned by a server in response to a request as described above. They are simple objects which contain a status code, headers, and any data returned by the server.

```
$request = new HttpRequest("/path", "GET");
$request->body[] = "some data";

$response = $client->execute($req);

$statusCode = $response->statusCode;
$headers = $response->headers;
$data = $response->result;
```

### Injectors

[](#injectors)

Injectors are blocks that can be used for executing arbitrary pre-flight logic, such as modifying a request or logging data. Injectors are attached to an `HttpClient` using the `addInjector` method.

The `HttpClient` executes its injectors in a first-in, first-out order, before each request.

```
class LogInjector implements Injector
{
    public function inject($httpRequest)
    {
        // Do some logging here
    }
}

$logInjector = new LogInjector();
$client = new HttpClient($environment);
$client->addInjector($logInjector);
...
```

### Error Handling

[](#error-handling)

`HttpClient#execute` may throw an `Exception` if something went wrong during the course of execution. If the server returned a non-200 response, [IOException](lib/PayPalHttp/IOException.php) will be thrown, that will contain a status code and headers you can use for debugging.

```
try
{
    $client->execute($req);
}
catch (HttpException $e)
{
    $statusCode = $e->response->statusCode;
    $headers = $e->response->headers;
    $body = $e->response->result;
}
```

License
-------

[](#license)

PayPalHttp-PHP is open source and available under the MIT license. See the [LICENSE](./LICENSE) file for more information.

Contributing
------------

[](#contributing)

Pull requests and issues are welcome. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/160662d52c89da3351e2a94b3d354074bf30137477fc7586eeacc52e3cb44462?d=identicon)[snipershady](/maintainers/snipershady)

---

Top Contributors

[![braintreeps](https://avatars.githubusercontent.com/u/200407?v=4)](https://github.com/braintreeps "braintreeps (24 commits)")[![snipershady](https://avatars.githubusercontent.com/u/20489856?v=4)](https://github.com/snipershady "snipershady (8 commits)")[![ganeshramc](https://avatars.githubusercontent.com/u/15274817?v=4)](https://github.com/ganeshramc "ganeshramc (2 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (1 commits)")[![demerino](https://avatars.githubusercontent.com/u/7817434?v=4)](https://github.com/demerino "demerino (1 commits)")[![HDLahlou](https://avatars.githubusercontent.com/u/30755392?v=4)](https://github.com/HDLahlou "HDLahlou (1 commits)")[![senenh](https://avatars.githubusercontent.com/u/5528076?v=4)](https://github.com/senenh "senenh (1 commits)")[![Dani-Kirby](https://avatars.githubusercontent.com/u/58542682?v=4)](https://github.com/Dani-Kirby "Dani-Kirby (1 commits)")[![tiffanyrzhou](https://avatars.githubusercontent.com/u/13946076?v=4)](https://github.com/tiffanyrzhou "tiffanyrzhou (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/snipershady-paypalhttp/health.svg)

```
[![Health](https://phpackages.com/badges/snipershady-paypalhttp/health.svg)](https://phpackages.com/packages/snipershady-paypalhttp)
```

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18579.5k1](/packages/omnipay-coinbase)[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
