Code Monkey home page Code Monkey logo

ebics.php's Introduction

Synap / EBICS

Scrutinizer Code Quality Code Coverage Build Status Gitter Flattr this

SensioLabsInsight

Un projet de bibliothèque PHP pour le protocole EBICS (version française)

EBICS est LE standard du moment pour tout ce qui relève de l'automatisation des échanges bancaires. Cependant, ce protocole étant encore jeune, il existe peu de bibliothèques sous licence libre. Par ailleurs, quelques variantes existent entre les banques françaises et les banques allemandes.

Ce projet vise à développer une bibliothèque PHP compatible avec les banques françaises afin de proposer aux développeurs un composant logiciel facilement exploitable pour leurs projets d'applications de gestion comptable, e-commerce, ou autre...

La raison d'être de Synap System est d'encourager et d'aider le développement du logiciel libre. De ce fait, la licence retenue pour ce projet est la GNU Affero General Public.

Un système de double licence payante pour les entreprises qui jugeraient la licence GNU Affero General Public trop contraignante est aussi envisagé. Contactez-nous si cela vous intéresse.

Faute de financement, aucune date de sortie n'est prévue pour le moment et le développement se fait au fil de l'eau.

Si vous souhaitez nous aider financièrement, si vous avez une suggestion ou si vous souhaitez contribuer, vous pouvez envoyer un e-mail à l'adresse suivante: [email protected] ou sur gitter.im

Installation

Ce projet nécessite composer pour l'installation des dépendances:

git clone https://github.com/Synap/EBICS.php.git
cd EBICS.php
composer install

Une fois cette opération réalisée copiez le fichier parameters.json-dist dans un fichier parameters.json et éditez-le pour y insérer les paramètres de connexion au serveur EBICS.

Ensuite ajoutez les clés privées et les certificats selon la liste suivante:

  • test/fixtures/keys/A005/cert.pem
  • test/fixtures/keys/A005/key.pem
  • test/fixtures/keys/E002/cert.pem
  • test/fixtures/keys/E002/key.pem
  • test/fixtures/keys/X002/cert.pem
  • test/fixtures/keys/X002/key.pem

Vous pouvez alors tester les commandes suivantes:

  • app/console ebics:hev
  • app/console ebics:hia
  • app/console ebics:ini

Attention! Ce projet est en cours de développement. N'utilisez ces commandes qu'à des fins de test et à vos risques et périls.

Liens

ebics.php's People

Contributors

charlycoste avatar gitter-badger avatar vjardin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ebics.php's Issues

Error trying to connect with French bank

Hi everybody and thank for your work,

I'm trying to use that class to connect to a French Bank but i'm facing that issue, that i tried to figure out for days and can't find a way to solve it.

So i've followed your examples showed in the presentation, but I keep having this response :

DER was not encoded.

Here is a sample of my code:

    $x509 = new X509Generator();
    $x509->setCertificateOptions($x509->getCertificateOptions());

    $client->setX509Generator($x509);


    try {
        $client->INI();
        /* @var \AndrewSvirin\Ebics\Services\KeyRingManager $keyRingManager */
        /* @var \AndrewSvirin\Ebics\Models\KeyRing $keyRing */
        $keyRingManager->saveKeyRing($keyRing);
    } catch (EbicsResponseExceptionInterface $exception) {
        echo sprintf(
            "INI request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
            $exception->getResponseCode(),
            $exception->getMessage(),
            $exception->getMeaning()
        );
    }

How to generate INI latter for a bank?

On PHP for generate Hash (SHA-256).
I do next. But I do not know exactly is it correct. Please check me and correct if I am wrong.

Here is correct certificat (INI response is OK).
$cert = file_get_contents('files/cert.pem');
$cert_array = openssl_x509_parse($cert);
$cert_details = openssl_pkey_get_details(openssl_pkey_get_public($cert));

Exponent hash without leading zeros.
$exponent = ltrim(hash('sha256', base64_encode($cert_details['rsa']['e'])), '0');

Modulus hash without leading zeros.
$modulus = ltrim(hash('sha256', base64_encode($cert_details['rsa']['n'])), '0');

HEX representation.
$A006_unpack = unpack("H*", $exponent . ' ' . $modulus);
$A006_H = array_shift($A006_unpack);

Here is my Hash (SHA-256).
echo implode(' ', str_split(strtoupper($A006_H), 2));

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.