Comments (7)
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.
Address information is now supported in all Credit Transfer versions. Have a look in the wiki page for more details.
from sephpa.
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.
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.
Thanks for the research.
I try to add the support as quickly as possible.
from sephpa.
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.
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)
- Import of a Sepa-File HOT 5
- Missing some payment-collections HOT 1
- My bank requires Id in InitgPty HOT 5
- PHP Fatal error: Uncaught Error: Class 'SephpaCreditTransfer' not found HOT 8
- Fatal error: Uncaught Error: Class 'SephpaCreditTransfer' not found HOT 1
- Give the php acces to generate Xml HOT 2
- Formated xml output HOT 1
- Remove HHVM from .travis.yml HOT 2
- Allow to change de fileName prefix HOT 1
- UltimateDebtor Name and Identification in CreditPayement 001_001_03
- help with multiple collections in new 2.x version HOT 7
- Since Update addPayment function is lost HOT 1
- Undefined class constant 'SEPA_PAIN_008_001_02' HOT 1
- Not possible to combine FRST and RCUR in one batch HOT 1
- addPayment() fehlt?! HOT 2
- $bicRequired is used to set an option 'allowEmptyBic' but shouldn't the value be flipped then? HOT 2
- Use of SEQUENCE_TYPE_FIRST does not seem to work HOT 4
- Public Access to Xml Data HOT 3
- pain.001.001.03 is abandoned soon. pain.001.001.09 needs to be implemented HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sephpa.