- Fix some php deprecation warnings (thanks @JurianArie)
- Warnings will now fail the unit tests.
- Minimal required PHP version is now 8.1 as it is the currently oldest supported version.
- Add support for pain.001.001.09 and pain.008.001.08.
check()
supports new fields:reqdexctndttm
, subfields ofpstladr
(bldgnm
,bldgnb
,twnnm
,twnlctnnm
,dstrctnm
,ctrysubdvsn
,pstbx
,pstcd
,dept
,subdept
,strtnm
,flr
,room
). All fields are case-insensitive.
- Add missing parameter and return types.
getDate()
,getDateWithOffset()
do not throw anymore to simplify checking for errors.checkAndSanitizeAll()
now returns an array instead of a string in case of an error.
- Add key
orgid_sm
to the check and sanitize functions.
- Fixed typo in
ultmtCdtr
(wasultmtCdrt
before). The old version still works for backward compatibility.
- Added support for keys
pstladr
andcdtrpstladr
. Both are aliases fordbtrpstladr
.
- Fixed: sanitizing of new
adrline
inputs was broken in case an array was used. - SepaUtilities are now tested on PHP 8.0.
- Minor code cleanup.
- Add travis tests for PHP 7.3 and 7.4
- Raise the minimal version to PHP 7.1. However, supported is only >=7.2 from now on.
- Removed
sanitizeShortText
andsanitizeLongText
as they were deprecated. - Added type hints basically everywhere.
- Turned on
strict_types
. - Removed
version
option fromcheck()
. - Add check for
ultmtDbtrId
,initgPtyId
,adrline
,ctry
anddbtrpstladr
, wheredbtrpstladr
is just a shorthand for an array containing at least one ofctry
andadrline
and nothing else. - Add sanitize function for
adrline
(it is just a 70-character text). - Add support for Swiss LSV+ DirectDebit pain.008.001.02.ch.03 (merged from hairacless/SepaUtilities)
- Add support for Swiss Credit Transfer pain.001.001.03.ch.02 (merged from tobi76/SepaUtilities)
- Fixed: Changed the keyword
ultmtdebtr
toultmtdebtr
in sanitize and check function. This was a misspelling and only partially supported.
- added support for
OrgId
fieldsID
andBicOrBei
. They can be used in check and sanitize functions using the keysorgid_id
andorgid_bob
. - added constants for max text lengths
SepaUtilities::TEXT_LENGTH_VERY_SHORT
,SepaUtilities::TEXT_LENGTH_SHORT
andSepaUtilities::TEXT_LENGTH_LONG
- The functions
sanitizeShortText()
andsanitizeLongText()
are now deprecated and will be removed in the next major version. The replacement issanitizeText()
using theTEXT_LENGTH_*
constants.
- Added the function
version2string
to get a string representation of a SEPA file version. - Changed the long array syntax to the short syntax. This breaks support for PHP <5.4 but this should not be used and was never officially supported anyway.
- added support for pain.008.001.02.austria.003
- little bug fixes
- added function to validate if two IBANs belong to the EEA (European Economic Area).
- dropped PHP 5.5 support
- added support for HHVM
- added support for SEPA file formats pain.001.001.03 and pain.008.001.02.
There are two variants of this file format, one from 2009 witch is used e.g. in the netherlands and one from 2016 specified in the Appendix 3 V3.0 used in germany where it is valid from November 2016. The two versions can be distinguished from each other via the new constantsSEPA_PAIN_001_001_03
andSEPA_PAIN_001_001_03_GBIC
respectivelySEPA_PAIN_008_001_02
andSEPA_PAIN_008_001_02_GBIC
, where the constants with eGBIC
suffix correspond to the new german file version. - improved some functions robustness
- renamed
PATTERN_FILE_IDS
toPATTERN_RESTRICTED_IDENTIFICATION_SEPA1
- added more tests to increase the code coverage
- added new
sanitizeDate()
function
- added some doc comments
- fixed amount format check
- added flag for replaceSpecialChars(), to prevent replacing german umlauts
- made IBAN validation by checksum optional (defaults to true)
- added optional IBAN validation by format (defaults to true)
- added support for exceptional IBAN - BIC connections
- Licence changed to LGPL
- added
checkInput()
,sanitizeInput()
andcheckAndSanitizeInput()
to validate user inputs. With these functions it is not required to check first, if an array index like$_POST['key1']['key2']
exists, before validating the values.
- Bugfix: If 'forceLongBic' options is used in
checkBic()
the BIC was always extended by three characters without checking the length if the BIC is already long.
- date methods now support TARGET2 days
- bugfix
- added
checkCreateDateTime()
- added to
check()
:purp
: Purposectgypurp
: Category Purpose
- added
sanitizeShortText()
andsanitizeLongText()
- added
checkAndSanitizeAll()
- added
crossCheckIbanBic()
- added
isNationalTransaction()
- added
checkRequiredCollectionKeys()
andcheckRequiredPaymentKeys()
- added
$options
parameter tocheckBic()
,check()
andcheckAndSanitize()
- added to
check()
:seqtp
: sequence typemsgid
: message identifieramdmntind
: amendment indicatorelctrncsgntr
: electronic signaturereqdexctndt
: requested execution datereqdcolltndt
: requested collection datedtofsgntr
: date of signature
- added constants for SEPA version
- added constants for the fields
lclInst
andseqTp
- added constant
BIC_REQUIRED_THRESHOLD
- SepaUtilities is now a project on its own and available over composer
- added support for cyrillic characters
- added
getDate()
to get a date with an offset of workdays (all days but sundays) - fixed some bugs in
replaceSpecialChars()