on2media/us-zip-code-to-state
Composer 安装命令:
composer require on2media/us-zip-code-to-state
包简介
Maps a US ZIP code to a state
关键字:
README 文档
README
Some payment providers require a state to be sent when the cardholder is based in the United States. Rather than add an additional field to our payment form we created this mapping based on data obtained from https://simple.wikipedia.org/wiki/List_of_ZIP_Code_prefixes.
Usage:
$state = (new \On2Media\UsZipCodeToState\UsZipCodeToState())->getState('90210'); // `CA`
Exceptions are thrown if the ZIP code is not five numeric characters or if no match is found.
In addition to state abbreviations (AK, AL, AR, AZ, CA, CO, CT, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY) the following other codes are also returned:
- Armed Forces (AA, AE, AP)
- District of Columbia (DC)
- Territories (GU, PR, VI)
统计信息
- 总下载量: 52.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-18