Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
11f1ba4
Improved tests
daanrijpkemacb Dec 30, 2023
acd613b
Fix problem in composer autoload
daanrijpkemacb Jan 5, 2024
ccd8838
Add Dependabot
daanrijpkemacb Apr 11, 2024
20c93eb
Merge pull request #40 from bluem-development/dev-master
DaanRijpkema Apr 11, 2024
c244926
Fallback to PHP Unit 9.0 & php 8.1 composer settings
daanrijpkemacb Apr 11, 2024
9fbf9cb
Fallback to PHP Unit 9.0 & php 8.1 minimum settings
daanrijpkemacb Apr 11, 2024
89a5fb6
Merge pull request #45 from bluem-development/dev-master
daanrijpkemacb Apr 11, 2024
ac8a969
improved exceptions
daanrijpkemacb Jan 5, 2024
23cae88
Merge pull request #38 from bluem-development/fix-exceptions
daanrijpkemacb Apr 11, 2024
e0d8568
Update README.md
daanrijpkemacb Apr 11, 2024
ab32268
remove deprecated config
daanrijpkemacb Apr 11, 2024
0e9f922
Merge pull request #49 from bluem-development/dev-master
daanrijpkemacb Apr 11, 2024
a541d1f
Merge pull request #48 from bluem-development/daanrijpkemacb-patch-1
daanrijpkemacb Apr 11, 2024
0c8ff3b
Updated XSD validation files
daanrijpkemacb Jun 12, 2024
04a376f
Updated CI
daanrijpkemacb Jun 12, 2024
54c718d
Merge branch 'master' into update-validation
daanrijpkemacb Jun 12, 2024
324b99a
Merge pull request #58 from bluem-development/update-validation
daanrijpkemacb Jun 12, 2024
7be9d58
Add Sofort Digital services, bancontact and giropay payment methods t…
daanrijpkemacb Jun 12, 2024
ae2acf6
Improved readme, mentioning the new documentation
daanrijpkemacb Jun 12, 2024
6363f45
Add interface for SetPaymentMethod methods
daanrijpkemacb Jun 12, 2024
6bc075d
Add return hints for Bluem Context
daanrijpkemacb Jun 14, 2024
be6cb9f
Append mandateID properly if base already has query string params
daanrijpkemacb Jun 14, 2024
7193f56
Append url params properly if base already has query string params
daanrijpkemacb Jun 14, 2024
e7da87a
Fallback to Merchant return URL base if no debtor Return URL
daanrijpkemacb Jun 14, 2024
97168cc
Improve brand ID setting for payments
daanrijpkemacb Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
uses: php-actions/composer@v5

- name: PHPUnit Tests
uses: php-actions/phpunit@v2
uses: php-actions/phpunit@v3
with:
version: 9.5
php_version: 8.1
bootstrap: vendor/autoload.php
bootstrap: ./vendor/autoload.php
configuration: ./.github/workflows/phpunit.xml
9 changes: 7 additions & 2 deletions .github/workflows/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php" colors="true"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">../../tests</directory>
</testsuite>
</testsuites>
</phpunit>
</phpunit>
102 changes: 21 additions & 81 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ Utilized by other applications as well:
- [Magento2 module](https://github.com/bluem-development/bluem-magento/), available for Bluem customers.
- Several third-party customer applications by Bluem customers.

## Documentation

> Read our improved documentation [**here**](https://bluem-development.github.io/bluem-docs/bluemphp.html)

We have several guides available there. They include:
- [Getting started guide](https://bluem-development.github.io/bluem-docs/tutorial-configuration.html)
- [Tutorial on payments](https://bluem-development.github.io/bluem-docs/tutorial-payments.html)
- [Tutorial on webhooks](https://bluem-development.github.io/bluem-docs/tutorial-webhooks.html)
- More are coming soon!

## Remaining documentation

Most of this will be migrated into the documentation mentioned above. Note: You might find duplicate information below.

## Table of Contents
* [Requirements](#requirements)
* [Getting started:](#getting-started)
Expand Down Expand Up @@ -50,8 +64,14 @@ Utilized by other applications as well:
* [Appendices](#appendices)
+ [List of all supported BICs per context](#list-of-all-supported-bics-per-context)

## 2.4 is coming soon
A new version of the PHP library will be released in the coming 1-2 months.
Starting this release, **PHP 8.1** is the minimum required version for this library.

## Requirements
- Since our release >= 2.3, **PHP 8.0** is the minimum required version for this library. Previous releases requires **PHP 7.4**.
- 2024: Starting at our release >= 2.4, **PHP 8.1** is the minimum required version for this library. Previous releases requires **PHP 8.0**.
- 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**.

- Please use the [major git releases](https://github.com/bluem-development/bluem-php/releases) for the stable versions of this plugin.
- Refer to the `composer.json` requirements for any other dependencies

Expand Down Expand Up @@ -232,86 +252,6 @@ The Webhook is only needed for ePayments and eMandates: online stores/portals th
Please note that the flow for the IBAN-Name check is shorter: a TransactionRequest is performed. The results return as a TransactionResponse.
This is because the end-user is not needed; the call is straight to the Bank Database, that provides in the TransactionResponse the IBAN-Name check results.

## Preselecting a bank for Payment requests using debtorWallet
**Note:** This is relevant for bank-based transactions and services:

It is possible to preselect a Bank within your own application for Payments, based on an IssuerID (BIC/Swift code) when creating a Mandate, Payment or Identity request. This can be used if you want to user to select the given bank in your own interface and skip the bank selection within the Bluem portal interface.
This reduces the amount of steps required by performing the selection of the bank within your own application and interface by utilizing the preselection feature from the PHP library on the request object as so:

```php
$BIC = "INGBNL2A";
$request->selectDebtorWallet($BIC);
```
Parameter has to be a valid BIC code of a supported bank. An invalid BIC code will trigger an exception. **Please note that supported BICs differ per service as not every bank offers the same services!** The supported BIC codes per service can also be requested from a Bluem object, given the service context. **As appendix to this Documentation file, you can find a full list of all BICs per context.**

Illustrated here is that a list of BICs per context can also be retrieved programmatically:

```php
$MandatesBICs = $bluem->retrieveBICsForContext("Mandates"); // also specific to localInstrumentCode, see notes.
$PaymentsBICs = $bluem->retrieveBICsForContext("Payments");
$IdentityBICs = $bluem->retrieveBICsForContext("Identity");
```
Input of a different context will trigger an exception. If valid, the result is an array of `Bluem\BluemPHP\BIC` objects with attributes `IssuerID` and `IssuerName`: the BIC and Bank name respectively. You can use this to populate your user interface.

Please note that the BIC list will vary when a different `localInstrumentCode` is configured. The localInstrumentCode `CORE` and `B2B` are supported by different banks. Based on your configuration, the right BIC list is loaded from context automatically and used to verify the debtorWallet.

This method can be used when creating iDIN and when creating iDEAL requests; you could store the selected bank (“Issuer”) on user level and use it when creating a request for your user.
- You can inform the user WHY this is necessary and refer to the new laws and rules, in your own website/application or refer to the news/public announcements.
- You can inform the user about the amount of trouble required: display a piece of text saying that it only takes a minute or two, and that it is stored for your convenience: that it ensures integrity, and a valid webshop experience.

## Using different Payment transaction methods

**Important note: ensure you have the right BrandID set up for specific payment methods. Refer to your account manager to retrieve a list of the specific BrandIDs per payment method**

You can allow the PayPal and Creditcard payment methods by selecting these within the request object before sending it.

To use iDeal, (default option). A BIC **can** be provided. If left empty, bank selection will occur in the Bluem portal.
```php
$BIC = 'INGBNL2A';
$request = $request->setPaymentMethodToIDEAL($BIC);
```

To use PayPal, give in a PayPal account email address. The email is also not required.
```php
$payPalAccount = 'john.doe@gmail.com';
$request = $request->setPaymentMethodToPayPal($payPalAccount);
```

To use Creditcards, you can set the credit card details as follows (not required)
```php
$request = $request->setPaymentMethodToCreditCard();
```
or
```php
$cardNumber = '1234000012340000';
$name = 'John Doe';
$securityCode = 123;
$expirationDateMonth = 11;
$expirationDateYear = 2025;

$request = $request->setPaymentMethodToCreditCard(
$cardNumber,
$name,
$securityCode,
$expirationDateMonth,
$expirationDateYear
);
```

To use Sofort, use the following method:
```php
$request = $request->setPaymentMethodToSofort();
```

To use Carte Bancaire, use the following method:
```php
$request = $request->setPaymentMethodToCarteBancaire();
```

These methods will throw an exception if required information is missing.

Once the request executes, the link to the transaction will send you to the Bluem Portal with the corresponding interface and flow.

## Webhooks
Webhooks exist for Payments, eMandates and Identity. They trigger during requests to the Bluem flow and send data to your application.
They are vital to ensure all processes are always completed, even if the customer/user does not reach your regular callback method(s) in your flow.
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@
},
"autoload": {
"psr-4": {
"Bluem\\BluemPHP\\": "src/"
"Bluem\\BluemPHP\\": "src/",
"Bluem\\BluemPHP\\Tests\\": "tests/"
}
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpspec/prophecy": "~1.0",
"vlucas/phpdotenv": "^5.4",
"roave/security-advisories": "dev-latest",
"rector/rector": "^0.15.10",
"squizlabs/php_codesniffer": "^3.7",
"magento/magento-coding-standard": "^31.0",
"phpcompatibility/php-compatibility": "^9.3"

},
"prefer-stable" : true,
"scripts": {
Expand Down
Loading