You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`bluem-php` is a PHP 8.3 library for Bluem payment flows: Payments, eMandates, iDIN, and IBAN-name check.
5
+
-`src/Bluem.php` is the main orchestration layer: it builds requests, validates XML, sends them through `Transport/`, and turns responses into `Responses/*` objects.
6
+
-`src/Webhook.php` handles inbound webhook XML and is intentionally strict: HTTPS POST + `text/xml; charset=UTF-8` + XML/signature validation.
-`src/Transport/` isolates HTTP; `CurlHttpTransport` is the default and is injected into `Bluem` for testability.
12
+
-`src/Validators/*` enforces XML and webhook constraints; do not bypass these checks in higher layers.
13
+
14
+
## Conventions specific to this repo
15
+
- Public API names are legacy-compatible and intentionally mixed-case in places (`CreateMandateRequest`, `PerformRequest`, `getConfig`, `Webhook::getPurchaseID()`); avoid renaming unless you are ready to update downstream consumers.
16
+
-`phpcs.xml.dist` uses PSR-12 with narrow exceptions for legacy method/property naming and file-header ordering.
17
+
- Existing code mixes older style and newer strict typing; prefer small, behavior-preserving edits over broad refactors.
18
+
19
+
## Developer workflow
20
+
- Install deps with `composer install`.
21
+
- Lint with `make lint`; auto-fix style with `make lint_fix`.
22
+
- Run unit tests with `make test_unit` or `./vendor/bin/phpunit tests/Unit`.
23
+
- Run live tests with `make test_integration` / `make test_acceptance`; these require `.env`.
24
+
- CI (`.github/workflows/ci.yml`) runs on PHP 8.3, then `make lint`, then PHPUnit.
25
+
26
+
## Environment and testing
27
+
- Copy `.env.example` to `.env` for integration/acceptance tests.
28
+
- Required env vars are enforced in `tests/Integration/BluemGenericTestCase.php`: `BLUEM_ENV`, `BLUEM_SENDER_ID`, `BLUEM_BRANDID`, `BLUEM_TEST_ACCESS_TOKEN`, `BLUEM_MERCHANTID`, `BLUEM_MERCHANTRETURNURLBASE`.
29
+
- Unit tests typically use a fake transport; integration tests extend the shared base case and hit live Bluem services.
30
+
31
+
## When changing code
32
+
- Update request/response/context pieces together so XML shape, endpoint URL, and validation stay aligned.
33
+
- Check `validation/*.xsd` and `examples/` when touching service-specific payloads.
34
+
- Keep webhook validation strict; relaxing HTTPS, content-type, or signature checks is a security regression.
**Bluem-php for Payment, Mandates, iDIN & IBAN-Name check**
4
4
@@ -50,14 +50,19 @@ Utilized by other applications as well:
50
50
*[Appendices](#appendices)
51
51
+[List of all supported BICs per context](#list-of-all-supported-bics-per-context)
52
52
53
-
## Requirements
54
-
- Update April 2024: Since our release >= 2.4, **PHP 8.1** is the minimum required version for this library. Previous releases requires **PHP 8.0**.
53
+
54
+
# Requirements & Versioning
55
+
## 3.0 is coming with PHP 8.3 support and requirement
56
+
A new version of the PHP library will be released in the coming 1-2 months.
57
+
Starting this release, **PHP 8.3** is the minimum required version for this library.
58
+
- 2026: Starting at our release >= 3.0, **PHP 8.3** is the minimum required version for this library. Previous releases requires **PHP 8.1**.
59
+
- 2024: Starting at our release >= 2.4, **PHP 8.1** is the minimum required version for this library. Previous releases requires **PHP 8.0**.
55
60
- Update April 2023: Since our release >= 2.3, **PHP 8.0** is the minimum required version for this library. Previous releases requires **PHP 7.4**.
56
61
57
62
- Please use the [major git releases](https://github.com/bluem-development/bluem-php/releases) for the stable versions of this plugin.
58
63
- Refer to the `composer.json` requirements for any other dependencies
59
64
60
-
##Getting started
65
+
# Getting started
61
66
Install the library through [Composer](https://getcomposer.org). Run Composer to install this library and dependencies from your project folder.
62
67
63
68
```bash
@@ -74,6 +79,8 @@ See [Changelog](changelog.md)
74
79
## Testing
75
80
For improving future features, unit testing is introduced since november 2021.
76
81
82
+
The repository also has a PHPCS linting setup: `make lint` runs the shared ruleset from `phpcs.xml.dist`, and CI uses the same lint step so local and automated checks stay aligned. That XML file also contains a few narrow exceptions for legacy naming and file-header issues, which lets the existing public API stay intact without failing the build on historical style violations.
83
+
77
84
Tests are located in the `tests` folder
78
85
To run tests:
79
86
```
@@ -245,6 +252,12 @@ To use Carte Bancaire, use the following method:
0 commit comments