Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Japan Post Bank Account Number Converter

License

Notifications You must be signed in to change notification settings

sanmai/jpb-account-converter

Repository files navigation

Japan Post Bank Account Number Converter

Build Status Coverage Status

This library lets you convert a specific to Japan Post Bank account code into a familiar branch name and account number pair.

Installation

As simple as this:

composer require sanmai/jpb-account-converter

Usage

$converter = new \KigoBangoShiraberu\Converter('14030', '12345671');
var_dump($converter->getAccountType());
var_dump($converter->getBranchName());
var_dump($converter->getBranchNameKana());
var_dump($converter->getAccountNumber());
echo "\n$converter\n";

Sample output:

string(6) "普通"
string(9) "四〇八"
string(18) "ヨンゼロハチ"
string(7) "1234567"

銀行名	ゆうちょ銀行
金融機関コード	9900
店番	408
預金種目	普通
店名	四〇八店(ヨンゼロハチ店)
口座番号	1234567

You can confirm its correctness with the original tool from the Japan Post Bank.

Only difference from the original tool is that this library doesn't check a branch number against the list of known branch numbers. Every other check is in place. See the tests.