PHPackages                             ergosarapu/donation-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ergosarapu/donation-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ergosarapu/donation-bundle
==========================

Donation Bundle allows creating developer friendly donation websites easily

0.2.0(1y ago)1210↑200%[1 PRs](https://github.com/ergosarapu/donation-bundle/pulls)MITPHPPHP ^8.2CI passing

Since Sep 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ergosarapu/donation-bundle)[ Packagist](https://packagist.org/packages/ergosarapu/donation-bundle)[ RSS](/packages/ergosarapu-donation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (35)Versions (7)Used By (0)

DonationBundle
==============

[](#donationbundle)

Donation Bundle allows creating Symfony based donation websites easily

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

[](#installation)

Open a command console, enter your project directory and execute:

```
composer require ergosarapu/donation-bundle
```

To initialize database, first generate migrations files ...

```
bin/console doctrine:migrations:diff
```

... then run migrations to create database tables:

```
bin/console doctrine:migrations:migrate
```

Register bundle routes:

```
// config/routes.yaml

donation_bundle_routes:
    # loads routes from the given routing file stored in bundle
    resource: '@DonationBundle/config/routes.xml'

# Define or override your routes here

donation_bundle_routes_campaign:
    # loads rest of loosely matching routes as last so they will not match before the ones defined before
    resource: '@DonationBundle/config/routes_campaign.xml'
```

Create admin user:

```
php bin/console donation:add-user [email] [givenname] [familyname] --admin
```

If you run your app in localhost, then the admin panel can be accessed at .

Register Payum gateway factories
--------------------------------

[](#register-payum-gateway-factories)

The bundle uses Payum for payment gateway abstraction. In order to use a gateway, register Payum gateway factory, e.g:

```
// config/services.yaml

app.montonio_gateway_factory:
    class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
    arguments: [ErgoSarapu\PayumMontonio\MontonioGatewayFactory]
    tags:
        - { name: payum.gateway_factory_builder, factory: montonio }
```

Then configure [PayumBundle](https://github.com/Payum/PayumBundle) and gateways.

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

[](#configuration)

The following configuration options are available for the Donation Bundle:

```
# config/packages/donation.yaml

donation:

    # Form configuration.
    form:
        currencies:           # Required

            # Prototype: Currency code
            currency_code:

                # Default amount pre-filled for the end user.
                amount_default:       ~ # Required
                amount_choices:       []

    # Gateways configuration
    gateways:

        # Prototype
        name:

            # The label of the gateway group shown to the end user
            group:                ~ # Required

            # The label of payment gateway shown to the end user
            label:                ~ # Required

            # The icon of payment gateway shown to the end user
            image:                ~

            # Available recurring frequencies, null for one-time (default) or date interval string, e.g. P1M for monthly, P1W for weekly, etc
            frequencies:

                # Default:
                -

            # Marks gateway as country specific so user can quickly filter gateways with same country. Must be valid alpha-2 country code.
            country:              ~
```

Process Subscription payments
-----------------------------

[](#process-subscription-payments)

To create new payments for subscriptions (renew) run following command periodically. This dispatches created payments to messenger transport for capturing:

```
bin/console donation:subscription:process
```

To handle subscription payment capture asynchronously, you may create following Messenger configuration. Adjust according to your needs:

```
# config/packages/messenger.yaml

framework:
    messenger:
        transports:
            async: 'doctrine://default'

            subscription:
                dsn: 'doctrine://default?queue_name=subscription'
                failure_transport: subscription_failed
                retry_strategy:
                    max_retries: 0 // Do not retry subscription capture automatically, it will land in failure transport for manual processing

            subscription_failed:
                dsn: 'doctrine://default?queue_name=subscription_failed'
                retry_strategy:
                    max_retries: 10
                    delay: 0

        routing:
            'ErgoSarapu\DonationBundle\Message\CapturePayment': subscription
```

Reset password feature
----------------------

[](#reset-password-feature)

The password reset feature uses [SymfonyCastsResetPasswordBundle](https://github.com/symfonycasts/reset-password-bundle), check its configuration to modify its behavior.

In order to use reset password feature, install [Mailer](https://symfony.com/doc/current/mailer.html) component in your application and configure [sender globally](https://symfony.com/doc/current/mailer.html#configuring-emails-globally):

```
# config/packages/mailer.yaml

mailer:
    envelope:
        sender: 'donations@example.com'
    headers:
        From: 'Donations '
```

Development
===========

[](#development)

Set up dev environment using DDEV
---------------------------------

[](#set-up-dev-environment-using-ddev)

```
ddev start
```

Install dependencies
--------------------

[](#install-dependencies)

To restrict packages install to specific Symfony version, install symfony/flex globally and specify your desired Symfony version:

```
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex:^2.4
composer config extra.symfony.require "7.1"
composer update
```

Testing
-------

[](#testing)

Use following script to run database migrations and tests:

```
./run_tests.sh
```

Set up app integrated dev environment
-------------------------------------

[](#set-up-app-integrated-dev-environment)

TODO: Describe how to set up dev environment with Symfony app using this bundle. While it is possible to develop bundle without setting up app itself, it is useful to verify things work properly as expected.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance70

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

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.

###  Release Activity

Cadence

Every ~157 days

Total

2

Last Release

449d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae4991ba52e9f5af5fa7334e9d23bf79046f8ce92e74af96cd25babe9f0afc2?d=identicon)[ergosarapu](/maintainers/ergosarapu)

---

Top Contributors

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

---

Tags

symfony-ux

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ergosarapu-donation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ergosarapu-donation-bundle/health.svg)](https://phpackages.com/packages/ergosarapu-donation-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-demo

EasyAdmin Demo Application

145.7k](/packages/easycorp-easyadmin-demo)[forumify/forumify-platform

121.8k11](/packages/forumify-forumify-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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