Bounded Context for the Wikimedia Deutschland fundraising payment (sub-)domain. Used by the user facing donation application and the "Fundraising Operations Center" (which is not public software).
To use the Fundraising Payments library in your project, add a dependency on wmde/fundraising-payments
to your project's composer.json
file. Here is a minimal example of a composer.json
file that just defines a dependency on Fundraising Payments 1.x:
{
"require": {
"wmde/fundraising-payments": "~1.0"
}
}
The payment context calls the PayPal REST API to create payments.
These API calls need credentials and a one-time setup of subscription plans
(i.e. definition of recurring payments) on the PayPal server.
There is a command line tool to do the subscription plan setup.
You can call this command (create-subscription-plans
) from the console in Fundraising Application
or from the bin/console
file in this bounded context.
There is another command, list-subscription-plans
that lists all the configured plans.
See Configuring the PayPal API for more details on these commands and their configuration.
This project has a Makefile that runs all tasks in Docker containers via
docker-compose
. You need to have Docker and the docker-compose
CLI
installed on your machine.
To pull in the project dependencies via Composer, run:
make install-php
To run all CI checks, which includes PHPUnit tests, PHPCS style checks and coverage tag validation, run:
make ci
To run the PHPUnit tests run
make test
To run a subset of PHPUnit tests or otherwise pass flags to PHPUnit, run
docker-compose run --rm app ./vendor/bin/phpunit --filter SomeClassNameOrFilter
This Bounded context follows the architecture rules outlined in Clean Architecture + Bounded Contexts.
You can also look at the dependency graph of the different namespaces.
To regenerate the dependency graph, you can either use deptrac
directly (on a system or container that has both PHP
and GraphViz available):
docker-compose run --rm --no-deps app php ./vendor/bin/deptrac --formatter=graphviz-image --output=docs/dependency-graph.svg
Or you can use deptrac
to generate the input file inside the Docker container and use dot
to create the SVG:
docker-compose run --rm --no-deps app php ./vendor/bin/deptrac --formatter=graphviz-dot --output=docs/dependency-graph.dot
dot -odocs/dependency-graph.svg -Tsvg docs/dependency-graph.dot