PHPackages                             integer-net/callback-proxy - 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. [API Development](/categories/api)
4. /
5. integer-net/callback-proxy

ActiveProject[API Development](/categories/api)

integer-net/callback-proxy
==========================

A proxy to dispatch callback requests to multiple targets. Useful to share payment integrations with multiple (e.g. test) systems.

13[3 issues](https://github.com/integer-net/callback-proxy/issues)PHP

Since Oct 30Pushed 7y ago12 watchersCompare

[ Source](https://github.com/integer-net/callback-proxy)[ Packagist](https://packagist.org/packages/integer-net/callback-proxy)[ RSS](/packages/integer-net-callback-proxy/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

Integer\_Net Callback Proxy
===========================

[](#integer_net-callback-proxy)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c57b640df3074a3e30cb8dd5eea9cdbc3272f3d3bfa6e96d44c343efba634b19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e74656765722d6e65742f63616c6c6261636b2d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/integer-net/callback-proxy)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c965fc9ad8a71233d5622a94ae88acdfc5995ef0e0c52a8684c06d371301654c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e74656765722d6e65742f63616c6c6261636b2d70726f78792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/integer-net/callback-proxy)[![Coverage Status](https://camo.githubusercontent.com/d3b274445510d78dfad6ddf48fcb8d770b6d3d425316c0f75f88281830268d90/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696e74656765722d6e65742f63616c6c6261636b2d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/integer-net/callback-proxy/code-structure)[![Quality Score](https://camo.githubusercontent.com/3e5c78c6f9b15d1120da8e5a238bb4207e2b60bb71e82c7f473b1a875f534773/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e74656765722d6e65742f63616c6c6261636b2d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/integer-net/callback-proxy)[![Total Downloads](https://camo.githubusercontent.com/e03ea77197009a6d74a2cfe5628f4150dd2e2377f6c1a151ed4497be8eaa9d21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e74656765722d6e65742f63616c6c6261636b2d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/integer-net/callback-proxy)

This is a service to integrate third party integrations with multiple environments, typically test systems.

It can distribute callbacks to several systems, for example:

```
proxy.example.com/paypal-dev/postBack

=>

dev1.example.com/paypal/postBack
dev2.example.com/paypal/postBack
dev3.example.com/paypal/postBack

```

The first successful response is returned. If no response was successful (HTTP status code 200), the last response is returned.

If it is used for dev systems, only the proxy must be made accessible from outside by the third party, instead of all target systems.

Installation
------------

[](#installation)

1. Create project via composer ```
    composer create-project integer-net/callback-proxy

    ```
2. Set up web server with document root in `public`.

Configuration
-------------

[](#configuration)

1. Copy [`config.php.sample`](config.php.sample) to `config.php`.
2. Adjust the `proxy/targets` configuration, e.g.:

    ```
    'proxy' => [
        'targets' => [
            'paypal-dev' => [
                'https://dev1.example.com/paypal/',
                'https://dev2.example.com/paypal/',
            ],
        ],
    ],

    ```

    This example routes `/paypal-dev/*` to `https://dev1.example.com/paypal/*` and `https://dev2.example.com/paypal/*`.

Advanced Configuration
----------------------

[](#advanced-configuration)

Instead of a plain URI string, each target can also be configured with additional options:

```
[
  'uri' => 'https://dev1.example.com/paypal/',
  'basic-auth' => 'username:password',
]

```

- **uri** (required) - the base URI
- **basic-auth** - HTTP basic authentication in the form "username:password"

The default dispatcher strategy is to dispatch the request to all targets and return the first successful (2xx) response.

You can choose a different strategy in `config.php`:

```
'proxy' => [
    'strategy' => \IntegerNet\CallbackProxy\DispatchStrategy\DispatchAllReturnFirstSuccess::class,
]

```

**Available Strategies:**

- `\IntegerNet\CallbackProxy\DispatchStrategy\DispatchAllReturnFirstSuccess::class` - the default strategy, see above
- `\IntegerNet\CallbackProxy\DispatchStrategy\StopOnFirstSucces::class` - returns the first successful (2xx) response, stops dispatching further targets

You can implement your own strategies, by implementing the `\IntegerNet\CallbackProxy\DispatchStrategy` interface.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Runs unit tests, mutation tests and static analysis

```
php -S localhost:9000 -t public

```

Starts the proxy locally on port 9000 for manual testing. Needs a valid configuration in `config.php`. As a generic target URI, you can use `https://httpbin.org/anything/`

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Fabian Schmengler](https://github.com/schmengler)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.txt) for more information.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/be7ce3a8a91df7dcf5f545b805865f65cab4b96daedfd3bc20a3b792d2450467?d=identicon)[schmengler](/maintainers/schmengler)

![](https://avatars.githubusercontent.com/u/2962722?v=4)[integer\_net GmbH](/maintainers/integer-net)[@integer-net](https://github.com/integer-net)

---

Top Contributors

[![schmengler](https://avatars.githubusercontent.com/u/367320?v=4)](https://github.com/schmengler "schmengler (18 commits)")

### Embed Badge

![Health badge](/badges/integer-net-callback-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/integer-net-callback-proxy/health.svg)](https://phpackages.com/packages/integer-net-callback-proxy)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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