GithubHelp home page GithubHelp logo

bluem-development / bluem-php Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 8.0 663 KB

A PHP interface for utilizing the Bluem services ePayments, eMandates, iDIN and/or IBAN-Name check. Utilize this library to write your own applications in PHP that communicate with Bluem, without having to handle the flow yourself.

License: GNU General Public License v3.0

PHP 100.00%
identity payments mandates iban-checker bluem

bluem-php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bluem-php's Issues

DebtorReference is converted to alphanumeric only

In the Bluem API the DebtorReference has a restriction on the length (max 35) but not on the allowed characters.
The library is converting the DebtorReference to alphanumeric only while the API allowes whitespaces and special chars.

Versioning

Hi,

I was a bit confused regarding the way this library is versioned. Recently there was a "major" update (DaanRijpkema@bd8ce95) from 2.0.x to 2.1.x containing some breaking changes. When breaking changes are introduced the versioning should have been updated to 3.0.x. Please try to use the semantic versioning standard (https://semver.org/) to prevent these sudden surprises when updating only a minor version.

Thanks in advance.
Nico

Version 2.3.2.4 breaks iban name check

The update to version 2.3.2.4 breaks the iban name check. The IBANNameCheckBluemResponse GetNameResult returns empty string.

We think that's because the GetNameResult calls getKeyFromIBANCheckResult with one parameter. And the second one is then null. The second one get's passed to the getIBANCheckResultObject as a parameter $parentObjectKey. This causes $parent->{$parentObjectKey} empty check to be true.

WebhookXmlValidation::validate() must be compatible with WebhookValidator::validate()

Since version 2.3.2.4 our PHP unit test are failing.
We are running PHP8.1

PHP Fatal error:  Declaration of Bluem\BluemPHP\Validators\WebhookXmlValidation::validate(SimpleXMLElement $data): Bluem\BluemPHP\Validators\WebhookXmlValidation must be compatible with Bluem\BluemPHP\Validators\WebhookValidator::validate($data): Bluem\BluemPHP\Validators\WebhookValidator in .../vendor/bluem-development/bluem-php/src/Validators/WebhookXmlValidation.php on line 26
In WebhookXmlValidation.php line 26:
                                                                               
  Declaration of Bluem\BluemPHP\Validators\WebhookXmlValidation::validate(Sim  
  pleXMLElement $data): Bluem\BluemPHP\Validators\WebhookXmlValidation must b  
  e compatible with Bluem\BluemPHP\Validators\WebhookValidator::validate($dat  
  a): Bluem\BluemPHP\Validators\WebhookValidator    

PaymentReference is generated with an invalid value

$this->paymentReference = "$this->debtorReference$this->transactionID";

DebtorReference has to be maximal 35 characters long
TransactionID has to be alphanumeric and maximal 64 characters long and is set by the library by the first 28 characters of DebtorReference plus YYYYMMDD
PaymentReference has to be alphanumeric and maximal 35 characters long

So, given this example:
DebtorReference = "Website order 12345678";
The library is removing all the non-alphanumeric values from the DebtorReference (#20) (why?).

TransactionID will be "Websiteorder1234567820220906";
PaymentReference will be "Websiteorder12345678Websiteorder1234567820220906";

The PaymentReference is a combination of a max 35 long string and a max 36 long string, but can only be 35 chars long and will throw a validation error from the API.

Expected behaviour is that PaymentReference can be set by the implementation (and will be validated) or otherwise will be a valid generated value which meets the API requirements.

IBAN-Name check Error: Request is not formed correctly

We are implementing the IBAN-Name check feature with this package in a Laravel application.

When there is a special character in de name we get an error reponse. The errror is:

Error: Request is not formed correctly. More details: Error 26 in  (Line: 12):Entity 'eacute' not defined;

The name we use in Hénk de Vries.

If we have a look in de IBANBluemRequest the iban and name are sanitized and converted to html entities:

htmlentities( $name )

If we remove the htmlentities the request is formed correctly.

Only problem with the response now is dat the AssumedName is Hénk de Vries. Its looks like something is wrong with the utf-8 encode or decoding. In the PerformRequest function you can see that the request values get utf8_encode, but the response never gets decoded.

Example repo to reproduce problem: https://github.com/jhhazelaar/laravel-bluem-htmlentities-encoding

BIC is required for using iDEAL

When you create a payment without payment method, by default iDEAL is used without a BIC. That all works well.
When you set setPaymentMethodToIDEAL you have to define a BIC otherwise you'll get an validation error.

Because Bluem works without defining a BIC (you'll get the bank selection screen) the expected behaviour is that setPaymentMethodToIDEAL can be called without a BIC.

Setting the webhook url alongside the payment transaction creation

Would it be possible to allow setting the webhook url alongside creating the payment transaction?

As I am working with a local environment, test environment and acceptance environment, the webhook url domain changes per environment so it would be nice and time-saving if it would be possible to set this through the payment creation transaction without having to get in contact via email every time for the url change.

The self generated TransactionID which is added to the debtorReturnURL is wrong

When you create a PaymentBluemRequest, a $transactionID is generated (CreatePaymentTransactionID).
But that TransactionID doesn't make any sense because Bluem generates its own transactionID.

So the self generated TransactionID is added (together with the entranceCode) to the debtorReturnURL but on the return page you can't do anything with the transactionID because it doesn't match the transactionID known by Bluem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.