Download the PHP package tathevik/fatca without Composer
On this page you can find all versions of the php package tathevik/fatca. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tathevik/fatca
More information about tathevik/fatca
Files in tathevik/fatca
Package fatca
Short Description PHP library for generation of FATCA IDES submission files
License CC0-1.0
Homepage https://github.com/tathevik/fatca
Informations about the package fatca
fatca-ides-php
This is a PHP library that converts bank client data to FATCA files submittable via the IDES gateway. If you find in this library any code that is specific to the Financial Institution for which I did this work, do not hesitate to point them out to me by opening an issue.
For more information check the IRS FATCA IDES Technical FAQs
For other language implementations, please check the IRS github page
Pre-requisites
- php
- client data in php array form
- SSL certificate for your financial institution
- Private and public keys used to get the SSL certificate
Installation instructions
Install composer
Install php extensions
If emails are enabled, pass your config (similar to this ) to the toEmail
function of Transmitter
class (check example below)
Next, download the financial institution's ssl certificate, private key, and public key. Note that the public key can be extracted from the certificate (on the TODO to be implied without the need for the user to specify it)
Examples
For a complete example of how to use this library, please check IDES-Data-Preparation-Php.
Example 1: generate ZIP file for submission on the IDES gateway
Example 2: To submit a correction XML file
Use the same code as above, but use
Also, check the correction.php command-line utility from the IDES-Data-Preparation-PHP
project
License
Please check [[LICENSE]]
Testing
Schema versions
Current state
The schema files and IRS public key are committed to this repo in assets
.
The committed versions are the 2.0 versions.
This package was tested succesfully against the IDES test gateway on Jan 31, 2017. The test included
- submitting test data to the server via SFTP using the IDES-Data-Preparation-Php package
- receiving an ACK for the submission via email
- receiving a response from the IRS using the IDES-Data-Preparation-Php package
Updating
To update them, run the following two scripts:
-
./assets/update.sh
: Downloads files from IRS website- Note that the URL's in the script may need to be updated because newer versions are usually uploaded to new endpoints
- Note also that there are some file renaming lines in the script so that I can diff versions
- e.g.
git diff ba722d8bcda61f657529a67cdbec873a29dc7d70 5f9545b565ddf0d41997b29c704c3990813f4bb8
will diff version 1.1 and 2.0
php updateXsd.php
: converts the schema files to PHP classes insrc/FatcaXsdPhp
- I moderate the updates and commit them to the repo if suitable
- Open issues on these are:
- I currently fix the below issues manually after the update
- There seems to be a problem in
src/FatcaXsdPhp/oecd/ties/stffatcatypes/v1/Address_Type.php
by having two AddressFree fields @xmlNamespace urn:oecd:ties:fatca:v1
is missing fromsrc/FatcaXsdPhp/FATCA_OECD
pending https://github.com/moyarada/XSD-to-PHP/issues/36- The AddressFree field has the wrong namespace: should be urn:oecd:ties:stffatcatypes:v1 instead of
urn:oecd:ties:fatca:v1
- ReportingGroup.php is not generated + its
@var
is missing src/FatcaXsdPhp/oecd/ties/stffatcatypes/v1/NamePerson_Type.php
- @xmlNamespace urn:oecd:ties:fatca:v1
- changed manually to
- @xmlNamespace urn:oecd:ties:stffatcatypes:v1
Manual validation
The validation of an existing xml file can be done manually against the schema on ubuntu using
All versions of fatca with dependencies
monolog/monolog Version ^1.21
phpseclib/phpseclib Version *
robrichards/xmlseclibs Version *
shadiakiki1986/swiftmailer-wrapper Version ^0.2.0
shadiakiki1986/xsd-to-php Version ^0.1
ext-dom Version *
ext-mbstring Version *
ext-zip Version *
ext-mcrypt Version *
ext-bcmath Version *