Code Monkey home page Code Monkey logo

Comments (7)

AbcAeffchen avatar AbcAeffchen commented on July 30, 2024 1

Good to know. At the moment it is not supported.
I will take a look into this and try to add support, but as always it will probably take some time.

from sephpa.

AbcAeffchen avatar AbcAeffchen commented on July 30, 2024 1

Address information is now supported in all Credit Transfer versions. Have a look in the wiki page for more details.

from sephpa.

AbcAeffchen avatar AbcAeffchen commented on July 30, 2024 1

A little update on this topic.
It turns out that this feature is far less complete as I thought.

There is a PstlAdr for both creditor and debtor and for for both credit transfer and direct debit. Of this four only one is currently implemented.

This week is quite full, but I try to add all missing parts until next weekend.

from sephpa.

chland avatar chland commented on July 30, 2024

Just looked a bit into it. Seems like these fields are madatory if you wanna deal with Direct Debits from non-EU countries like Switzerland (CH), Monaco (MC), San Marino (SM), Jersey (JE), Guernsey (GG), Isle of Man (IM), St. Pierre and Miquelon (PM).

Reason is this EU-regulation: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32015R0847

from sephpa.

AbcAeffchen avatar AbcAeffchen commented on July 30, 2024

Thanks for the research.
I try to add the support as quickly as possible.

from sephpa.

chland avatar chland commented on July 30, 2024

Hey, thanks for adding the address-information. I did some quick tests and it seems like you only added it to transfers but not the DirectDebit-classes.

Unfortunately I don't have GIT installed on this machine right now so I can't post a PR easily but I thought I would quickly post my solution. I copied your code from the SepaCreditTransfer*.php files to the SepaDirectDebit*.php files and modified it slightly. I added this code-block:

        if(isset($payment['dbtrPstlAdr']))
        {
            $pstlAdr = $drctDbtTxInf->Dbtr->addChild('PstlAdr');

            if(isset($payment['dbtrPstlAdr']['ctry']))
                $pstlAdr->addChild('Ctry', $payment['dbtrPstlAdr']['ctry']);

            if(isset($payment['dbtrPstlAdr']['adrLine']))
            {
                foreach(is_array($payment['dbtrPstlAdr']['adrLine'])
                            ? $payment['dbtrPstlAdr']['adrLine']
                            : [$payment['dbtrPstlAdr']['adrLine']] as $adrLine)
                    $pstlAdr->addChild('AdrLine', $adrLine);
            }
        }

after the

$drctDbtTxInf->addChild('Dbtr')->addChild('Nm', $payment['dbtr']);

line in the generatePaymentXml() function and this seems to do the trick. If I now add something like

'dbtrPstlAdr' => ['ctry' => 'DE', 'adrLine' => 'Talalaweg 123, 12345 Blubbhausen, Deutschland']

to the payment-Array it adds the Country/AdrLine to the XML.

from sephpa.

AbcAeffchen avatar AbcAeffchen commented on July 30, 2024

Ah, that is true. I only added it to Credit Transfer files. I will add it to Direct Debit files as soon as possible.

from sephpa.

Related Issues (20)

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.