php-iban
هي مكتبة لتحليل معلومات الحساب البنكي IBAN (و IIBAN) والتحقق من صحتها وإنشاءها بلغة PHP.
يمكن استرداد جميع أجزاء رقم IBAN، بما في ذلك رمز البلد، والمجموع الاختباري، وBBAN، ورمز المؤسسة المالية أو البنك، ورقم الحساب، ومكان استخدام نظام وطني ثابت الطول، وكذلك رمز الفرع/الفرز. يمكن أيضًا استرداد المجاميع الاختبارية الوطنية القديمة والتحقق من صحتها وتعيينها بشكل صحيح، حيثما كان ذلك متاحًا، سواء كانت تنطبق على جزء رقم الحساب أو معرفات البنك والفروع أو جزء أو كل ما سبق. يمكن تحويل رموز الدول ذات رقم IBAN إلى تنسيقات ISO3166-1 alpha-2 وIANA، ويمكن الاستعلام عن بلد IBAN الأصلي الذي يعمل كمسجل للأقاليم التابعة، والعملة الوطنية الرسمية (تنسيق رمز ألفا ISO4217)، واسم البنك المركزي وعنوان URL للبنك المركزي. يمكن أيضًا الاستعلام عنها لتسهيل التكامل. يمكن تحويل أرقام IBAN بين التمثيل البشري والآلي. قد يتم حجب أرقام IBAN لعرضها على البشر في ظروف خاصة مثل تحديد الهوية النسبية. تم تضمين قاعدة بيانات لأمثلة/اختبار أرقام IBAN من بلدان مختلفة. وأخيرًا، يمكن تقديم اقتراحات دقيقة للغاية للمدخلات المقصودة في الأصل عند اكتشاف رقم IBAN غير صحيح ويكون ذلك بسبب خطأ في النسخ.
تم إنشاء المحلل اللغوي باستخدام التعبيرات العادية لتكييف محتويات سجل IBAN الرسمي المتوفر من SWIFT، ثم تم تعديله يدويًا لحالات خاصة مثل الأخطاء والسهو في مواصفات SWIFT الرسمية.
وقد تم منذ ذلك الحين تصحيح أوجه القصور المختلفة في التعديل الأولي، ويجب أن يكون الإصدار الحالي تطبيقًا صحيحًا وموثوقًا إلى حد ما.
حيثما كان ذلك مناسبًا، تم أيضًا دمج توصيات اللجنة الأوروبية للمعايير المصرفية (ECBS).
يرجى الأخذ في الاعتبار أنه نظرًا لأن المواصفات تتغير بشكل متكرر، فقد لا تكون محدثة بنسبة 100% إذا تم إصدار إصدار جديد مؤخرًا - ومع ذلك فأنا أبذل قصارى جهدي. يُعتقد أننا حاليًا على اطلاع بإصدار يناير 2020، على سبيل المثال. إصدار PDF رقم 86.
مرخص بموجب LGPL، وهو مجاني للاستخدام في الإعدادات التجارية.
يتم دعم 116 دولة رسمية وغير رسمية ذات رقم IBAN التالية.
إذا كنت تستخدم الملحن، فيمكنك ببساطة تشغيل composer require globalcitizen/php-iban
للبدء. يقال (و) تم إجراؤها عبر الملحن.
(إذا لم يكن لديك composer
بعد وترغب في تثبيته بطريقة غير آمنة (غير مستحسن، ولكنه مناسب) يمكنك تشغيل curl -sS https://getcomposer.org/installer | php
أو wget -O- https://getcomposer.org/installer | php
)
ثم قم فقط بإضافة ما يلي إلى ملف composer.json
الخاص بك:
// composer.json
{
"require" : {
"globalcitizen/php-iban" : "4.2.3"
}
}
بعد ذلك، يمكنك تثبيت التبعيات الجديدة عن طريق تشغيل أمر تحديث composer
من الدليل الذي يوجد به ملف composer.json
الخاص بك:
# install
$ php composer.phar install
# update
$ php composer.phar update globalcitizen/php-iban
# or you can simply execute composer command if you set it to
# your PATH environment variable
$ composer install
$ composer update globalcitizen/php-iban
يمكنك رؤية هذه المكتبة على Packagist.
للتثبيت العادي، استخدم الأمر git clone
:
# HTTP
$ git clone https://github.com/globalcitizen/php-iban.git
# SSH
$ git clone [email protected]:globalcitizen/php-iban.git
بدلًا من ذلك، يمكنك تضمين مكتبة php-iban
في مستودعك المُدار بواسطة git
برقم مراجعة محدد، بحيث يكون من الممكن تحديث الإصدار بطريقة يمكن التنبؤ بها مع الحفاظ على نظام أكبر يعتمد على وظائفه:
# enter your project's git repo
$ cd my-existing-project-with-a-git-repo/
# select an appropriate place to create the php-iban subdir
$ cd lib/
# add php-iban as a submodule
$ git submodule add https://github.com/globalcitizen/php-iban.git
# commit new submodule
$ git commit -m ' Add php-iban submodule '
بعد ذلك، عند التحقق من مشاريع git
التي تحتوي على وحدات فرعية لأول مرة، عادةً ما تحتاج إلى إجراء بضع خطوات إضافية:
# check out your project as normal
$ git clone [email protected]:your/project.git
# initialize submodules
$ git submodule init
# update submodules
$ git submodule update
لتخطي هذه الخطوات، أضف الوسيطة --recursive
إلى git clone
عند السحب:
# check out your project, initialize and update all submodules
$ git clone --recursive [email protected]:your/project.git
إذا كنت ترغب لاحقًا في أن يستخدم مشروعك إصدارًا أحدث من php-iban
، فقم بتشغيل:
# fetch changes
$ git submodule update --remote php-iban
# commit
$ git commit -m ' Update php-iban submodule '
zip
أو tar.gz
unzip filename.zip
على الأنظمة الأساسية المشابهة لنظام Unix.php-iban
من الدليل الفرعي للدليل الأصلي libraries/php-iban
فيمكنك استخدام عبارة require_once() التالية: <?php
require_once ( dirname ( __FILE__ ) . ' /../libraries/php-iban/php-iban.php ' );
# ... your code utilizing php-iban
?>
يقارن الجدول التالي php-iban بمشاريع PHP الأخرى التي تقدم وظائف ذات صلة بـ IBAN، على أساس معلومات المشروع العامة ونماذج البرمجة المدعومة.
مشروع | يسانس. | بروك | س | بدأ | أحدث | نجم | يشاهد | شوكة | عمليات التثبيت | ثقافة المنزل | الإقلاع |
---|---|---|---|---|---|---|---|---|---|---|---|
php-إيبان | LGPL | ✔ | ✔ | 2009 | 4.2.3 | 426 | 29 | 104 | ~7 مليون+* | عالمي* | لا أحد |
ايبان | معهد ماساتشوستس للتكنولوجيا | ✘ | ✔ | 2013 | 1.3.0 | 50 | 9 | 19 | 178.39 ألف | الألمانية | الكثير |
رموز الأيزو | جي بي إل 3 | ✘ | ✔ | 2012 | 2.1.1 | 466 | 22 | 54 | 145 ألف | فرنسي | الكثير |
SepaUtil's | جي بي إل 3 | ✘ | ✔ | 2014 | 1.2.3 | 8 | 4 | 3 | 25 ألف | الألمانية | phpunit |
سيمفوني | معهد ماساتشوستس للتكنولوجيا | ✘ | ✔ | 2013 | 3.3.6 | 15 ألف | 1214 | 5.6 ألف | 23 مليون+ | فرنسي | الكثير |
ملحوظات:
الآن دعونا نلقي نظرة على الميزات.
+ | ايزو | IANA | سيبا | ₶ | ثالث أكسيد الكربون | طن متري | نورث كارولاينا | ₴ | سي بي | ح؟ | التسجيل | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
php-إيبان | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | 116: ملف CSV كامل ومصحح الأخطاء مع سلسلة أدوات ووثائق مفتوحة المصدر |
ايبان | ✔* | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 54: جزء، مضمن، أصل مشكوك فيه |
رموز الأيزو | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 66: جزئية، مضمنة، أصل مشكوك فيه |
SepaUtil's | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 89: جزئية، مضمنة، أصلها مشكوك فيه |
سيمفوني | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 95: جزئية، مضمنة، أصلها مشكوك فيه |
ملحوظة:
IBAN XXXX XXXX XXXX XXXX
بدلاً من XXXXXXXXXXXXXXXX
- أكثر منطقية.باختصار، في حين أن مستخدمي الملحن قد اعتمدوا على ما يبدو على المكتبات المنافسة (خاصة Iban)، ربما بسبب الوقت الذي استغرقناه لدمج ملف الملحن، فإن هذه المكتبات غالبًا ما تكون إما أطر ويب كاملة أو مرهقة في التبعيات، وأقل نضجًا، وفاشلة للاحتفاء بمؤسسة البرمجيات الحرة، لا تدعم نموذج البرمجة الإجرائية (عندما لا تتمكن AbstractProductClassMakerFactories من حل المشكلة)، وتستخدم البيانات من مصادر مشكوك فيها، وتميل إلى استخدام التراخيص التي غير متوافقة مع بعض الاستخدامات التجارية، وهي بصراحة تفتقر إلى الميزات.
لذا، أيها المستخدم الشجاع... اختر php-iban : المكتبة الأخلاقية والوظيفية والمتطلعة إلى المستقبل والقليلة المتاعب والمفضلة لمعالجة IBAN وIBAN. اختر للفوز! ;)
إذا كنت تعرف عنوان URL لرقم IBAN الوطني أو BBAN أو وثائق المجموع الاختباري الوطني من مصادر رسمية، فيرجى إخبارنا بذلك في الإصدار رقم 39 والإصدار رقم 41.
بنوك جزر فارو (FO) لا تستجيب، ولا البنك الوطني الدنماركي الذي أحالني إليها.
لا يبدو أن لوكسمبورغ (LU) تتوافق مع أي نظام اختباري واحد. في حين أن بعض أرقام IBAN يتم التحقق من صحتها باستخدام أنظمة شائعة إلى حد معقول، إلا أن بعضها الآخر لا يتم ذلك أو يستخدم البعض الآخر. إن الاقتراح القائل بأن لوكسمبورغ لديها نظام المجموع الاختباري الوطني قد يكون في الواقع غير صحيح. نحن بحاجة إلى بعض التوضيح هنا، ونأمل أن يتمكن شخص ما من استخراج بيان رسمي.
لدى موريتانيا (MR) نظام المجموع الاختباري ثنائي الأحرف ولكن مثالنا IBAN لا يتطابق مع MOD97-10 وهو النظام المتوقع. في السابق، كان رقم IBAN هنا دائمًا ثابتًا على "13" رقمًا للمجموع الاختباري، ولكن اعتبارًا من الإصدار 66 من السجل، أصبح الآن ديناميكيًا، مما يشير إلى تغيير أو على الأقل نظام المجموع الاختباري المريح على المستوى الوطني.
إذا كنت على استعداد لقضاء بعض الوقت في البحث، فيمكننا إجراء المزيد من اختبارات أرقام IBAN لمعظم البلدان، وخاصة البلدان الصغيرة...
تم إصدار الإصدار 4.2.3 .
تم إصدار الإصدار 4.2.2 .
تم إصدار الإصدار 4.2.1 .
تم إصدار الإصدار 4.2.0 .
تم إصدار الإصدار 4.1.1 .
تم إصدار الإصدار 4.1.0 .
لقد تم الافراج عن الإصدار 4.0.0 .
لقد تم الافراج عن الإصدار 3.0.3 .
لقد تم الافراج عن الإصدار 3.0.2 .
لقد تم الافراج عن الإصدار 3.0.0 .
لقد تم الافراج عن الإصدار 2.8.2 .
تم إصدار الإصدار 2.8.1 .
TL
BBAN بإزالة المسافات الدخيلة (لم يؤثر على التحقق من صحة رقم IBAN). (شكرًا لـDanyCorbineauBappli) تم إصدار الإصدار 2.8.0 .
لقد تم الافراج عن الإصدار 2.7.5 .
لقد تم الافراج عن الإصدار 2.7.4 .
iban_to_obfsucated_format()
أو ObfuscatedFormat()
لتشويش رقم IBAN لسيناريوهات مخرجات محددة (مثل التعريف النسبي)لقد تم الافراج عن الإصدار 2.7.3 .
لقد تم الافراج عن الإصدار 2.7.2 .
تم إصدار الإصدار 2.7.1 .
تم إصدار الإصدار 2.7.0 .
تم إصدار الإصدار 2.6.9 .
SM
)لقد تم الافراج عن الإصدار 2.6.8 .
IT
)لقد تم الافراج عن الإصدار 2.6.7 .
SK
)لقد تم الافراج عن الإصدار 2.6.6 .
ini_set
فيهاتم إصدار الإصدار 2.6.5 .
gmp
لقد تم الافراج عن الإصدار 2.6.4 .
bcmath
لقد تم الافراج عن الإصدار 2.6.3 .
لقد تم الافراج عن الإصدار 2.6.2 .
تم إصدار الإصدار 2.6.1 .
تم إصدار الإصدار 2.6.0 .
لقد تم الافراج عن الإصدار 2.5.9 .
لقد تم الافراج عن الإصدار 2.5.8 .
لقد تم الافراج عن الإصدار 2.5.7 .
لقد تم الافراج عن الإصدار 2.5.6 .
لقد تم الافراج عن الإصدار 2.5.5 .
لقد تم الافراج عن الإصدار 2.5.4 .
لقد تم الافراج عن الإصدار 2.5.3 .
لقد تم الافراج عن الإصدار 2.5.2 .
تم إصدار الإصدار 2.5.1 .
908
) في صربيا (RS) لديه عدة أرقام IBAN حية ذات مجاميع اختبارية وطنية معطلة، لذلك نتجاهل جميع المجاميع الاختبارية الوطنية على الحسابات من ذلك البنك.تم إصدار الإصدار 2.5.0 .
INGB
(بنك ING) الذي أسقط المجموع الاختباري الأصلي01
(بنك سلوفينيا) الذين لا يحترمون المجاميع الاختباريةutils/example-ibans
والتي تحتوي بالفعل على عدد لا بأس به من الإدخالات لعدد كبير من البلدان. وهذا ينبغي أن يبسط البحوث المستقبلية.تم إصدار الإصدار 2.4.20 .
تم إصدار الإصدار 2.4.19 .
تم إصدار الإصدار 2.4.18 .
تم إصدار الإصدار 2.4.17 .
01
تحت سلوفينيا (SI)) مخطط المجموع الاختباري الوطني، كحالة خاصة. تمت إضافة استثناء إلى تنفيذ المجموع الاختباري الوطني لسلوفينيا.تم إصدار الإصدار 2.4.16 .
تم إصدار الإصدار 2.4.15 .
تم إصدار الإصدار 2.4.14 .
تم إصدار الإصدار 2.4.13 .
iban_mistranscription_suggestions()
الآن بشكل صحيح عند تمرير سلاسل تشبه رقم IBAN منسقة بشكل غير محكم_verhoeff()
التي تدعم بعض تطبيقات المجموع الاختباري الوطنية بشكل صحيح عند تمرير إدخال غير صالحتم إصدار الإصدار 2.4.12 .
تم إصدار الإصدار 2.4.11 .
central_bank_url
و central_bank_name
، على سبيل المثال:تم إصدار الإصدار 2.4.10 .
currency_iso4217
بتخزين العملة الرسمية للبلد بتنسيق رمز ألفا ISO4217، على سبيل المثال:لقد تم الافراج عن الإصدار 2.4.9 .
parent_registrar
بتخزين بلد IBAN الخاص بالمسجل الأصلي لبلد IBAN، على سبيل المثال:لقد تم الافراج عن الإصدار 2.4.8 .
لقد تم الافراج عن الإصدار 2.4.7 .
لقد تم الافراج عن الإصدار 2.4.6 .
لقد تم الافراج عن الإصدار 2.4.5 .
لقد تم الافراج عن الإصدار 2.4.4 .
لقد تم الافراج عن الإصدار 2.4.3 .
لقد تم الافراج عن الإصدار 2.4.2 .
لقد تم الافراج عن الإصدار 2.4.1 .
تم إصدار الإصدار 2.4.0 .
iban_{set|find|verify}_nationalchecksum()
وما يعادلها من غلاف OO. يتم دعم بلجيكا (BE) وفرنسا (FR) وإسبانيا (ES) حاليًا. إذا كنت ترغب في رؤية بلدك مدعومًا، فيرجى الاطلاع على الإصدار رقم 39 والإصدار رقم 41. لقد تم الافراج عن الإصدار 2.3.1 .
تم إصدار الإصدار 2.3.0 .
تم إصدار الإصدار 2.2.0 .
تم إصدار الإصدار 2.1.9 .
تم إصدار الإصدار 2.1.8 .
تم إصدار الإصدار 2.1.7 .
iban_get_nationalchecksum_part()
و iban_country_get_nationalchecksum_start_offset()
و iban_country_get_nationalchecksum_stop_offset()
وما يعادلها من OO-wrapper $myIban->NationalChecksum()
و $myCountry->NationalChecksumStartOffset()
و $mycountry->NationalChecksumStopOffset()
. تم تحديث الاختبار والوثائق. إذا كنت تعرف أي شيء عن خوارزميات المجموع الاختباري الوطني، فيرجى تقديم المساعدة في الإصدار رقم 39.تم إصدار الإصدار 2.1.6 .
machine_format_only
.تم إصدار الإصدار 2.1.5 .
machine_format_only
الصارم الإضافي لـ verify_iban()
لإغلاق المشكلة رقم 22.لقد تم الافراج عن الإصدار 2.1.4 .
تم إصدار الإصدار 2.1.3 .
iban_to_human_format()
عند تمرير إدخال يحتوي بالفعل على مسافات.لقد تم الافراج عن الإصدار 2.1.2 . تم الآن دمج جميع رموز الدول IBAN غير الرسمية المعروفة. بالإضافة إلى التحديثات الطفيفة في الوثائق واختصار الاسم المذكور لكوسوفو، يضيف هذا الإصدار:
لقد تم الافراج عن الإصدار 2.1.1 . ويجري حاليا دمج رموز الدولة غير الرسمية لرقم الحساب المصرفي الدولي (IBAN)، ولا تزال العملية مستمرة. يضيف هذا الإصدار:
تم إصدار الإصدار 2.1.0 .
ويجري حاليا دمج رموز الدولة غير الرسمية لرقم الحساب المصرفي الدولي (IBAN)، ولا تزال العملية مستمرة. تم إنشاء علم جديد للتحقق مما إذا كانت الدولة عبارة عن سجل رسمي صادر عن SWIFT أم لا. ولذلك تم إضافة البلدان الجديدة التالية.
لاحظ أيضًا أنه تم وضع علامة على سجل IIBAN (AA) على أنه غير رسمي، وتم ترحيل الميزات المدرجة في docs/TODO
إلى مشكلات Github وتم حذف هذا الملف.
لقد تم الافراج عن الإصدار 2.0.1 . هذا للاحتفال بالاختبار الحقيقي، ودعم الملحن، وكذلك اللحاق بالتغييرات أخيرًا. يجب أن يكون هذا الإصدار محدثًا بجميع تغييرات التسجيل حتى الوقت الحاضر، بما في ذلك التغييرات أو الإضافات إلى البلدان:
تم إصدار الإصدار 1.6.0 . يتميز هذا الإصدار بمزيد من تصحيحات التسجيل (المناطق المضافة حديثًا ذات البيانات الخاطئة والمجاميع الاختبارية السيئة في نماذج أرقام IBAN، وما إلى ذلك) بالإضافة إلى إجراءات الاختبار المحسنة والوثائق الموسعة والوثائق المصححة. يُنصح جميع المستخدمين بالترقية. لدينا الآن تنفيذ برنامج نصي للاختبار تلقائيًا باستخدام Travis CI، لتوفير قوة إضافية لجميع التعليمات البرمجية الملتزم بها. استغرق هذا وقتًا أطول من المتوقع، ولسوء الحظ، اخترت الوقت المحدد الذي كسر فيه ترافيس سجلات البناء الخاصة به - https://www.traviscistatus.com/incidents/fcllblkclgmb - لمعرفة سبب كل هذه الضجة... مما يثبت مرة أخرى أن الحوسبة السحابية هي مجرد عظيم لكسر الأشياء بشكل غير متوقع. نظرًا لأنهم يريدون إخفاء الأشياء، لم يكن هناك أي إخراج لتصحيح الأخطاء على الإطلاق، وقد دفعني ذلك إلى الاعتقاد بأن هذا كان خطأي. أيها المبرمجون، انظروا: إنه بزوغ فجر عصر الفشل الغامض.
تم إصدار الإصدار 1.5.0 . لا توجد تغييرات في التعليمات البرمجية، ولكن لدينا الآن تكامل http://packagist.org/، ونأمل أن يؤدي ذلك إلى بدء العمل. إذا كنت تستخدم packagist، فيمكنك الآن إضافة المكتبة إلى مشروعك عن طريق تشغيل composer require globalcitizen/php-iban
(بفضل @acoulton لإرشادك إلى الطريق)
تم إصدار الإصدار 1.4.9 باستخدام عملية الإصدار الجديدة المستندة إلى Github. نأمل أن يوفر هذا نقطة ربط قوية لأولئك الذين يقومون بتجميع المكتبة مع برامج أخرى. لدينا أيضًا ملف بيانات تعريف مؤلف مساهم لتسهيل التكامل. تم دمج عناوين URL الجديدة لتسجيل IBAN. تمت إزالة بنية علامة/جذع SVN القديمة.
تم تصحيح عنوان URL لـ SWIFT إلى صفحة IBAN. تم التأكيد على دعم خطأ النسخ الخاطئ.
أخيرًا، قامت جوجل بإلغاء code.google.com
وانتقلنا إلى Github! بمجرد تنظيف بنية trunk
/ tag
القديمة (المتبقية من svn
) وترجمة هذا المستند من تنسيق wiki القديم إلى تخفيض السعر، سيتم إصدار نسخة جديدة.
تم إصدار الإصدار 1.4.6 :
لسوء الحظ، تتطلب Google الآن مشاريع code.google.com
لاستخدام Google Drive. لقد حاولت استخدام Google Drive (قم بالتسجيل للحصول على حساب جديد، والقفز عبر حلقات البريد الإلكتروني، والمعاملة كإنسان آلي، وتعلم واجهة جديدة غبية وسهلة الاستخدام، والحصول على رسائل خطأ لا معنى لها مثل "تم تجاوز حد المشاركة الخاص بك" (مع 2x290 كيلو بايت على حساب جديد طُلب مني إنشاؤه) وفقدت الصبر تمامًا.
لذا، في الوقت الحالي، سيتعين عليك التنزيل باستخدام git
بدلاً من ذلك. سأقوم بترحيل php-iban
إلى Github قريبًا. لقد أصبحت Google بالفعل مصدر إزعاج مؤخرًا، فماذا يحدث مع كل هذه الأشياء غير المرغوب فيها من Google+ وGoogle Drive، وتدمير بيكاسا، وتدمير Sketchup بسبب قلة الاهتمام، وما إلى ذلك. ما الذي يفكرون فيه؟
تم إصدار الإصدار 1.4.5 :
تم إصدار الإصدار 1.4.4 :
تم تحويل مستودع التعليمات البرمجية المصدر للمشروع من svn
(لاف) إلى git
(yay!) .
تم إصدار الإصدار 1.4.3 :
docs/COMEDY-OF-ERRORS
أو مضمنة في محول التسجيل.تم إصدار الإصدار 1.4.2 :
تم إصدار الإصدار 1.4.1 :
$__disable_iiban_gmp_extension=true;
)لا يزال الإصدار 1.4.1 يجري إعداده ، ويسحق بعض الأخطاء وتحديث السجل ... وفي الوقت نفسه ، فقد جاء انتباهي إلى أننا ظهرنا في مدونة Code Candy! http://www.codecandies.com/2012/05/30/no-exceptions/ hooray for the german for the fult of fult! ههههههههههههههههههههههههههههههه
تم إصدار الإصدار 1.4.0 :
VERSION
، لتضمين معلومات الإصدار الثابت في Troue Tree ، حسب الطلب. تم إصدار الإصدار 1.3.9 :
تم إصدار الإصدار 1.3.8 :
تم إصدار الإصدار 1.3.7 :
تم إصدار الإصدار 1.3.6 :
تم إصدار الإصدار 1.3.5 :
تم إصدار الإصدار 1.3.4 :
تم إصدار الإصدار 1.3.3 :
تم إصدار الإصدار 1.3.2 :
تم إصدار الإصدار 1.3.1 :
تم إصدار الإصدار 1.3.0 . يضيف هذا الإصدار دعم اقتراح خطأ الخطأ.
تم إصدار الإصدار 1.2.0 . يضيف هذا الإصدار دعم رقم حساب Internet International Bank (IIBAN) ، وفقًا لمشروع الإنترنت Iiban الحالي على http://tools.ietf.org/html/draft-iiban-01
تم إصدار الإصدار 1.1.2 . هذا يضيف علامات مفتوحة طويلة إلى ملف المكتبة الرئيسي من أجل تبسيط النشر على العديد من تثبيتات PHP الافتراضية.
تم إصدار الإصدار 1.1.1 . هذا يعمل على إصلاح خطأ مطبعي في استدعاء دالة في غلاف OO الجديد. لا يحتاج المستخدمون غير OO إلى الترقية.
تم إصدار الإصدار 1.1.0 . يضيف هذا الإصدار مكتبة غلاف موجهة نحو الكائن والتحديثات ذات الصلة إلى الوثائق واختبار البرامج النصية. ليس من الضروري للمستخدمين الحاليين الترقية.
تم إصدار الإصدار 1.0.0 . يتضمن هذا الإصدار التغييرات التالية:
iban_country_is_sepa($iban_country)
iban_to_human_format($iban)
في وقت سابق من الشهر ... إصدار صيانة صغير ، وليس حرجًا.
*لدينا الآن http://groups.google.com/group/php-iban-users قائمة البريدية. لا تتردد في نشر ملاحظاتك أو استفساراتك أو اقتراحاتك - نود أن نعرف كيف تستخدم المكتبة. حتى الآن ، وصل المشروع إلى أكثر من 400 تنزيل ولا يزال قويًا ، مع أكثر من مستخدم جديد يوميًا - عرض جيد جدًا لمكتبة متخصصة!
* تم إصدار الإصدار 12 . تم تحسين ملف التسجيل ، جزئياً نتيجة لتقارير المستخدم وجزئيًا نتيجة للقضايا التي تم الكشف عنها أثناء إجراء الاختبارات الآلية مقابل الإصدار 11.
لم يتم تمثيل الصف المصحح للعمودان في العنوان ( bban_length
و iban_length
). لقد تمت إضافتها الآن.
لا يتم تضمين الإدخالات إلى إدخالات التسجيل للأراضي الفرنسية (PF ، TF ، YT ، NC ، PM ، WF) بشكل صريح في TextFile المواصفات السريعة. تم تكرارها من فرنسا وفقا لتعليقات غير منظمة ضد هذا الإدخال. على سبيل المثال ، تم إجراء Ibans لأغراض توضيحية عن طريق تعديل بادئة البلد ببساطة دون تجديد عمليات الفحص. يجب أن تكون أمثلة IBAN المدرجة لهذه المناطق صحيحة الآن.
قام جبل طارق ومجر (GI ، HU) بإصلاح خطأ حيث كان لدى كلتا المنطقتين قولون لا لزوم لهما على تعبيراتهما المنتظمة بعد تحويل المستند الأولي ، والذي كان يتسبب في فشل التحقق من صحة جميع Ibans في تلك البلدان.
قام موريشيوس (MU) بتصحيح توقعات IBAN من 31 إلى 30.
مثال على ذلك السويد (SE) تم تعديل IBAN يدويًا من مثال مواصفات IBAN في وقت مبكر من التطوير ولم يسبق الفحص. تم استعادة مثال IBAN الرسمي.
قامت تونس (TN) بتصحيح سلاسل التحقق غير السليمة الناتجة عن وجود خطأ في تحويل المستند الأولي (محدد تنسيق IBAN إلى وظيفة تحويل التعبير المنتظم).
require_once ( ' php-iban.php ' );
# ... your code utilising IBAN functions...
# Verify an IBAN number.
# An optional second argument specifies $machine_format_only (default is false)
# If true, the function will not tolerate unclean inputs
# (eg. spaces, dashes, leading 'IBAN ' or 'IIBAN ', lower case)
# If false (default), input can be in either:
# - printed ('IIBAN xx xx xx...' or 'IBAN xx xx xx...'); or
# - machine ('xxxxx')
# ... string formats.
# Returns true or false.
if (! verify_iban ( $ iban , $ machine_format_only = false )) {
# ...
}
# Check the checksum of an IBAN - code modified from Validate_Finance PEAR class
if (! iban_verify_checksum ( $ iban )) {
# ...
}
# Suggest what the user really meant in the case of transcription errors
$ suggestions = iban_mistranscription_suggestions ( $ bad_iban );
if ( count ( $ suggestions ) == 1 ) {
print " You really meant " . $ suggestions [ 0 ] . " , right? n" ;
}
# Find the correct checksum for an IBAN
$ correct_checksum = iban_find_checksum ( $ iban );
# Set the correct checksum for an IBAN
$ fixed_iban = iban_set_checksum ( $ iban );
# Verify the pre-IBAN era, BBAN-level national checksum for those countries that
# have such a system and we have implemented.
# (Returns '' if unimplemented, true or false)
$ result = iban_verify_nationalchecksum ( $ iban );
if ( $ result == '' ) {
print " National checksum system does not exist or remains unimplemented for the country of IBAN ' $ iban '. n" ;
}
elseif ( $ result == true ) {
print " IBAN ' $ iban ' passes the national checksum algorithm for its country. n" ;
}
else {
print " IBAN ' $ iban ' FAILS the national checksum algorithm for its country. n" ;
}
# Set the pre-IBAN era, BBAN-level national checksum for those countries that
# have such a system, where that system results in a dedicated checksum
# substring, and that we have implemented.
# (Returns '' if unimplemented, or the corrected string)
# (NOTE: On success, the function also subsequently recalculates the IBAN-level checksum)
$ national_checksum_algorithm_valid_iban = iban_set_nationalchecksum ( $ iban );
# Determine, but do not set, the pre-IBAN era, BBAN-level national checksum
# for those countries that have such a system, where that system results in
# a dedicated checksum substring, and that we have implemented.
# (Returns '' if unimplemented, or the expected national checksum substring)
$ expected_national_checksum = iban_find_nationalchecksum ( $ iban );
# Convert an IBAN to machine format. To do this, we
# remove IBAN from the start, if present, and remove
# non basic roman letter / digit characters
$ machine_iban = iban_to_machine_format ( $ iban );
# Convert an IBAN to human format. To do this, we
# add a space every four characters.
$ human_iban = iban_to_human_format ( $ iban );
# Convert an IBAN to obfuscated format for relative
# identification. To do this, we replace all but the
# leading country code and final four characters with
# asterisks.
$ obfuscated_iban = iban_to_obfuscated_format ( $ iban );
# Get the name of an IBAN country
$ country_name = iban_country_get_country_name ( $ iban_country );
# Get the domestic example for an IBAN country
$ country_domestic_example = iban_country_get_domestic_example ( $ iban_country );
# Get the BBAN example for an IBAN country
$ country_bban_example = iban_country_get_bban_example ( $ iban_country );
# Get the BBAN format (in SWIFT format) for an IBAN country
$ country_bban_format_as_swift = iban_country_get_bban_format_swift ( $ iban_country );
# Get the BBAN format (as a regular expression) for an IBAN country
$ country_bban_format_as_regex = iban_country_get_bban_format_regex ( $ iban_country );
# Get the BBAN length for an IBAN country
$ country_bban_length = iban_country_get_bban_length ( $ iban_country );
# Get the IBAN example for an IBAN country
$ country_iban_example = iban_country_get_iban_example ( $ iban_country );
# Get the IBAN length for an IBAN country
$ country_iban_length = iban_country_get_iban_length ( $ iban_country );
# Get the IBAN format (in SWIFT format) for an IBAN country
$ country_iban_format_as_swift = iban_country_get_iban_format_swift ( $ iban_country );
# Get the IBAN format (as a regular expression) for an IBAN country
$ country_iban_format_as_regex = iban_country_get_iban_format_regex ( $ iban_country );
# Determine whether an IBAN country is a member of SEPA (Single Euro Payments Area)
if (! iban_country_is_sepa ( $ iban_country )) {
# ... do something xenophobic ...
}
# Get the bank ID start offset for an IBAN country
$ country_bankid_start_offset = iban_country_get_bankid_start_offset ( $ iban_country );
# Get the bank ID stop offset for an IBAN country
$ country_bankid_stop_offset = iban_country_get_bankid_stop_offset ( $ iban_country );
# Get the branch ID start offset for an IBAN country
$ country_branchid_start_offset = iban_country_get_branchid_start_offset ( $ iban_country );
# Get the branch ID stop offset for an IBAN country
$ country_branchid_stop_offset = iban_country_get_branchid_stop_offset ( $ iban_country );
# Get the registry edition for an IBAN country (note: IIBAN country 'AA' returns 'N/A')
$ country_registry_edition = iban_country_get_registry_edition ( $ iban_country );
# Determine whether an IBAN country is an official, SWIFT issued country record
if (! iban_country_get_country_swift_official ( $ iban_country )) {
# ... do something against decentralization ...
}
# Get the IANA code for an IBAN country
$ country_iana = iban_country_get_iana ( $ iban_country );
# Get the ISO3166-1 alpha-2 code for an IBAN country
$ country_iso3166 = iban_country_get_iso3166 ( $ iban_country );
# Get the parent registrar IBAN country of an IBAN country
# (Returns '' in the normal case that the country is independently registered)
$ registrar_country = iban_country_get_parent_registrar ( $ iban_country );
if ( $ registrar_country == '' ) {
print " The mighty nation of ' $ iban_country ' stands strong and proud... n" ;
print " ... with its own heirarchy of bureaucrats! n" ;
}
else {
print " It has been foretold that the downtrodden natives of ' $ iban_country ' will one day n" ;
print " rise up and throw off the shackles of the evil ' $ registrar_country ' oppressors! n" ;
}
# Get the official currency of an IBAN country as an ISO4217 alpha code
# (Returns '' in the Internet (IIBAN) case, ie. no official currency)
$ official_currency = iban_country_get_currency_iso4217 ( $ iban_country );
if ( $ official_currency == '' ) {
print " There is no official currency for the IBAN country ' $ iban_country '. n" ;
}
# Get the URL of an IBAN country's central bank
# (Note: Returns '' if there is no central bank. Also, note that
# sometimes multiple countries share one central bank)
$ central_bank_url = iban_country_get_central_bank_url ( $ iban_country );
# Get the name of an IBAN country's central bank
# (Note: Returns '' if there is no central bank. Also, note that
# sometimes multiple countries share one central bank)
$ central_bank_name = iban_country_get_central_bank_name ( $ iban_country );
# Get the membership type of the country
# There are four types of memberships:
# * EU-Member States (eu_member)
# * EFTA-Member States (efta_member)
# * Other Memberships, which have monetary agreements with the EU (other_member)
# * Non-Members, which don't belong to the EU or have agreements (non_member)
$ country_membership = iban_country_get_membership ( $ iban_country );
# Get if the country is a eu member state
# (Note: Returns true, if member state; false otherwise)
$ country_membership = iban_country_get_is_eu_member ( $ iban_country );
# Get an array of all the parts from an IBAN
$ iban_parts = iban_get_parts ( $ iban );
# Get the country part from an IBAN
$ iban_country = iban_get_country_part ( $ iban );
# Get the BBAN part from an IBAN
$ bban = iban_get_bban_part ( $ iban );
# Get the Bank ID (institution code) from an IBAN
$ bank = iban_get_bank_part ( $ iban );
# Get the Branch ID (sort code) from an IBAN
# (NOTE: only available for some countries)
$ sortcode = iban_get_branch_part ( $ iban );
# Get the (branch-local) account ID from an IBAN
# (NOTE: only available for some countries)
$ account = iban_get_account_part ( $ iban );
# Get the checksum part from an IBAN
$ checksum = iban_get_checksum_part ( $ iban );
# Get the national checksum part from an IBAN (if it exists)
$ checksum = iban_get_nationalchecksum_part ( $ iban );
لا يتم تثبيط استخدام OO حيث يوجد اتجاه اليوم للإفراط في استخدام النموذج. ومع ذلك ، إذا كنت تفضل OO PHP ، فعندئذ ، استخدم الكائن الموجهة نحو الكائن ، الموضح أدناه.
require_once ( ' oophp-iban.php ' );
# ... your code utilising object oriented php iban functions...
# Example instantiation
$ iban = ' AZ12345678901234 '
$ myIban = new IBAN ( $ iban );
# Verify an IBAN number.
# Tolerates spaces, prefixes "IBAN ...", dashes, lowercase input, etc.
# Returns true or false.
if (! $ myIban -> Verify ()) {
# ...
}
# Verify an IBAN number in machine format only.
# Does not tolerate lowercase input, separators, whitespace or prefixes.
# Returns true or false.
if (! $ myIban -> VerifyMachineFormatOnly ()) {
# ...
}
# Check the checksum of an IBAN - code modified from Validate_Finance PEAR class
if (! $ myIban -> VerifyChecksum ()) {
# ...
}
# Suggest what the user really meant in the case of mistranscription errors
$ suggestions = $ badIban -> MistranscriptionSuggestions ();
if ( count ( $ suggestions )== 1 ) {
print " You really meant " . $ suggestions [ 0 ] . " , right? n" ;
}
# Find the correct checksum for an IBAN
$ correct_checksum = $ myIban -> FindChecksum ();
# Set the correct checksum for an IBAN
$ fixed_iban = $ myIban -> SetChecksum ()
# Verify the pre-IBAN era, BBAN-level national checksum for those countries that
# have such a system and we have implemented.
# (Returns '' if unimplemented, true or false)
$ result = $ myIban -> VerifyNationalChecksum ();
if ( $ result == '' ) {
print " National checksum system does not exist or remains unimplemented for this IBAN's country. n" ;
}
elseif ( $ result == true ) {
print " IBAN passes the national checksum algorithm for its country. n" ;
}
else {
print " IBAN FAILS the national checksum algorithm for its country. n" ;
}
# Set the pre-IBAN era, BBAN-level national checksum for those countries that
# have such a system, where that system results in a dedicated checksum
# substring, and that we have implemented.
# (Returns '' if unimplemented, or the corrected string)
# (NOTE: On success, the function also subsequently recalculates the IBAN-level checksum)
$ myIban -> SetNationalChecksum ();
# Determine, but do not set, the pre-IBAN era, BBAN-level national checksum
# for those countries that have such a system, where that system results in
# a dedicated checksum substring, and that we have implemented.
# (Returns '' if unimplemented, or the expected national checksum substring)
$ national_checksum = $ myIban -> FindNationalChecksum ();
# Convert an IBAN to machine format. To do this, we
# remove IBAN from the start, if present, and remove
# non basic roman letter / digit characters
$ machine_iban = $ myIban -> MachineFormat ();
# Convert an IBAN to human format. To do this, we
# add a space every four characters.
$ human_iban = $ myIban -> HumanFormat ();
# Convert an IBAN to obfuscated format for relative
# identification. To do this, we replace all but the
# leading country code and final four characters with
# asterisks.
$ obfsucated_iban = $ myIban -> ObfuscatedFormat ();
# To list countries, use the IBAN Class...
$ myIban -> Countries ();
# ... everything else is in the IBANCountry class.
# Example instantiation
$ countrycode = ' DE ' ;
$ myCountry = new IBANCountry ( $ countrycode );
# Get the country code of an IBAN country
$ country_code = $ myCountry -> Code ();
# Get the name of an IBAN country
$ country_name = $ myCountry -> Name ();
# Get the domestic example for an IBAN country
$ country_domestic_example = $ myCountry -> DomesticExample ();
# Get the BBAN example for an IBAN country
$ country_bban_example = $ myCountry -> BBANExample ();
# Get the BBAN format (in SWIFT format) for an IBAN country
$ country_bban_format_as_swift = $ myCountry -> BBANFormatSWIFT ();
# Get the BBAN format (as a regular expression) for an IBAN country
$ country_bban_format_as_regex = $ myCountry -> BBANFormatRegex ();
# Get the BBAN length for an IBAN country
$ country_bban_length = $ myCountry -> BBANLength ();
# Get the IBAN example for an IBAN country
$ country_iban_example = $ myCountry -> IBANExample ();
# Get the IBAN length for an IBAN country
$ country_iban_length = $ myCountry -> IBANLength ();
# Get the IBAN format (in SWIFT format) for an IBAN country
$ country_iban_format_as_swift = $ myCountry -> IBANFormatSWIFT ();
# Get the IBAN format (as a regular expression) for an IBAN country
$ country_iban_format_as_regex = $ myCountry -> IBANFormatRegex ();
# Determine whether an IBAN country is a member of SEPA (Single Euro Payments Area)
if (! $ myCountry -> IsSEPA ()) {
# ... do something xenophobic ...
}
# Get the bank ID start offset for an IBAN country
$ country_bankid_start_offset = $ myCountry -> BankIDStartOffset ();
# Get the bank ID stop offset for an IBAN country
$ country_bankid_stop_offset = $ myCountry -> BankIDStopOffset ();
# Get the branch ID start offset for an IBAN country
$ country_branchid_start_offset = $ myCountry -> BranchIDStartOffset ();
# Get the branch ID stop offset for an IBAN country
$ country_branchid_stop_offset = $ myCountry -> BranchIDStopOffset ();
# Get the national checksum start offset for an IBAN country
$ country_nationalchecksum_start_offset = $ myCountry -> NationalChecksumStartOffset ();
# Get the national checksum stop offset for an IBAN country
$ country_nationalchecksum_stop_offset = $ myCountry -> NationalChecksumStopOffset ();
# Get the registry edition for an IBAN country (note: IIBAN country 'AA' returns 'N/A')
$ country_registry_edition = $ myCountry -> RegistryEdition ();
# Determine whether an IBAN country is an official, SWIFT issued country record
if (! $ myCountry -> SWIFTOfficial ()) {
# ... do something against decentralization ...
}
# Get the IANA code for an IBAN country
$ country_iana = $ myCountry -> IANA ();
# Get the ISO3166-1 alpha-2 code for an IBAN country
$ country_iso3166 = $ myCountry -> ISO3166 ();
# Get the parent registrar IBAN country of an IBAN country
# (Returns '' in the normal case that the country is independently registered)
$ registrar_country = $ myCountry -> ParentRegistrar ();
if ( $ registrar_country == '' ) {
print " The mighty nation of ' $ iban_country ' stands strong and proud... n" ;
print " ... with its own heirarchy of bureaucrats! n" ;
}
else {
print " It has been foretold that the downtrodden natives of ' $ iban_country ' will one day n" ;
print " rise up and throw off the shackles of the evil ' $ registrar_country ' oppressors! n" ;
}
# Get the official currency of an IBAN country as an ISO4217 alpha code
# (Returns '' in the Internet (IIBAN) case, ie. no official currency)
$ official_currency = $ myCountry -> CurrencyISO4217 ();
if ( $ official_currency == '' ) {
print " There is no official currency for the IBAN country ' $ iban_country '. n" ;
}
# Get the URL of an IBAN country's central bank
# (Note: Returns '' if there is no central bank. Also, note that
# sometimes multiple countries share one central bank)
$ central_bank_url = $ myCountry -> CentralBankURL ();
# Get the name of an IBAN country's central bank
# (Note: Returns '' if there is no central bank. Also, note that
# sometimes multiple countries share one central bank)
$ central_bank_name = $ myCountry -> CentralBankName ();
# Get an array of all the parts from an IBAN
$ iban_parts = $ myIban -> Parts ();
# Get the country part from an IBAN
$ iban_country = $ myIban -> Country ();
# Get the checksum part from an IBAN
$ checksum = $ myIban -> Checksum ();
# Get the BBAN part from an IBAN
$ bban = $ myIban -> BBAN ();
# Get the Bank ID (institution code) from an IBAN
$ bank = $ myIban -> Bank ();
# Get the Branch ID (sort code) from an IBAN
# (NOTE: only available for some countries)
$ sortcode = $ myIban -> Branch ();
# Get the (branch-local) account ID from an IBAN
# (NOTE: only available for some countries)
$ account = $ myIban -> Account ();
# Get the national checksum part from an IBAN
# (NOTE: only available for some countries)
$ checksum = $ myIban -> NationalChecksum ();
انظر بنفسك كيف تقارن نهجنا وميزاتنا بشكل إيجابي مع كل هذه المكتبات ...
لغة | مكتبة |
---|---|
ج# | Iban-api-net |
جافا | Iban-api-java |
جافا | IBAN4J |
جافا | جافا أبان |
جافا سكريبت | iban.js |
جافا سكريبت | نانوغرام |
ObjectiveC | Iban-helper |
ObjectiveC | ibanvalidation |
بيرل | مكتبات CPAN مختلفة |
بايثون | Django-localflavor |
بايثون | المولد Iban |
روبي | بنك |
روبي | Iban-Tools |
روبي | iBandit |
روبي | Ibanizator |
روبي | iso-iban |