PHPackages                             twodudes/fxpay - 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. twodudes/fxpay

ActiveSymfony-bundle

twodudes/fxpay
==============

Payment gateway

04PHP

Since Oct 6Pushed 9y ago2 watchersCompare

[ Source](https://github.com/two-dudes/FXPay)[ Packagist](https://packagist.org/packages/twodudes/fxpay)[ RSS](/packages/twodudes-fxpay/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

FXPay
-----

[](#fxpay)

Payment gateway designed with forex in mind. Currently work in progres...

### Installation

[](#installation)

Installation with composer:

```
composer require twodudes\fxpay
```

### How does it work?

[](#how-does-it-work)

The system consists of:

MerchantConfig - stores the merchant configuration for the given vendor

HandlerStrategy - describes the strategy of dealing with the vendor

\######Request:

PaymentRequest - stores the request parameters, you want to send to the vendor

RequestBuilder - builds the array of parameters, needed to be passed to the vendor

\######Response:

ResponseValidator - validates the response, based on the merchants rules

ResponseBuilder - builds the payment response object, containing information about the transaction, once you got the merchant notification from the vendors system

For the workflow check the [TwoDudes\\FXPay\\HandlerStrategy\\FormWithRedirectStrategy](../master/HandlerStrategy/FormWithRedirectStrategy.php)

### I don't want to read, give me a sample

[](#i-dont-want-to-read-give-me-a-sample)

Check the tests

### How to use the event manager?

[](#how-to-use-the-event-manager)

There is a build in events system. You can use the built in event manager (the simpliest possible), or include your own one, if you want

```
$this->strategy = new FormWithRedirectStrategy($config);
$this->strategy->setEventManager(new EventManager());
```

If you want your custom event manager, just make sure, that it implements the TwoDudes\\FXPay\\Events\\EventManagerInterface

##### What event do you have?

[](#what-event-do-you-have)

Creating Request:

AfterRequestBuildEvent - fires, once the request builder built the params to generate the form. Here you can modify the generated params

AfterFormBuildEvent - fires, once the html content with the hidden form was built. Here you can modify the form html.

Processing response:

BeforeProcessResponseEvent - fires before any processing took place.

AfterBuildVendorResponseEvent - fires in the very end, once the VendorResponse is ready.

##### How to attach a new event

[](#how-to-attach-a-new-event)

```
$this->strategy->getEventManager()->attach(BeforeProcessResponseEvent::getName(), function(BeforeProcessResponseEvent $event) {
    $params = $event->getParams();
    ...
    do something with the params
    ...
    $event->setParams($params);
});
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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/8eb68ea0a238b346910752a25d7ed2ba13d13636a5eeffa8b7f817164d73cbe5?d=identicon)[megawilddaddy](/maintainers/megawilddaddy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/twodudes-fxpay/health.svg)

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

PHPackages © 2026

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