decrypted/id3global-service
Composer 安装命令:
composer require decrypted/id3global-service
包简介
Allows a PHP-powered website to communicate with the GBG ID3global API to verify identities. This library is not affiliated with GBG PLC in any way.
README 文档
README
Allows a PHP-powered website to communicate with the GBG ID3global API to verify identities.
Installation
Usage
The WSDL file gives an overview of the values that can be provided, these will vary by country.
Note: The code below is entirely subject to change. It is primarily focused at the moment around the AuthenticateSP method of the ID3Global API, and specifically on NZ, however it should be generic enough to easily support non-NZ systems easily.
/** * Namespaces: * * \ID3Global\Constants\Identity * \ID3Global\Gateways\GlobalAuthenticationGateway * \ID3Global\Services\GlobalAuthenticationService * \ID3Global\Identity\Address\FreeFormatAddress * \ID3Global\Identity\Address\FixedFormatAddress * \ID3Global\Identity\ContactDetails * \ID3Global\Identity\ContactDetails\LandTelephone * \ID3Global\Identity\ContactDetails\MobileTelephone * \ID3Global\Identity\ContactDetails\WorkTelephone * \ID3Global\Identity\Documents\NZ\DrivingLicence * \ID3Global\Identity\PersonalDetails * * \ID3Global\Identity\Addresses<\ID3Global\Identity\Address\FreeFormatAddress, \ID3Global\Identity\Address\FixedFormatAddress> * - CurrentAddress * - PreviousAddress[1-3] * - HistoricAddresses<\ID3Global\Identity\Address\FreeFormatAddress, \ID3Global\Identity\Address\FixedFormatAddress> * * \ID3Global\Identity\Documents * * Not core for implementation * \ID3Global\Identity\Aliases * \ID3Global\Identity\AlternateName * \ID3Global\Identity\BankingDetails\BankAccount * \ID3Global\Identity\BankingDetails\CreditDebitCard * \ID3Global\Identity\Documents\Address\UK\ElectricitySupplier * \ID3Global\Identity\Documents\Identity\Global\InternationalPassport * \ID3Global\Identity\Documents\Identity\Europe\EuropeanIdentityCard * \ID3Global\Identity\Documents\Identity\AU\ShortPassport * \ID3Global\Identity\Documents\Identity\AU\Medicare * \ID3Global\Identity\Documents\Identity\BR\CPFNumber * \ID3Global\Identity\Documents\Identity\CA\SocialInsuranceNumber * \ID3Global\Identity\Documents\Identity\CN\ResidentIdentityCard * \ID3Global\Identity\Documents\Identity\ES\TaxIDNumber * \ID3Global\Identity\Documents\Identity\MX\TaxIdentificationNumber * \ID3Global\Identity\Documents\Identity\UK\Passport * \ID3Global\Identity\Documents\Identity\UK\DrivingLicence * \ID3Global\Identity\Documents\Identity\UK\NationalInsuranceNumber * \ID3Global\Identity\Documents\Identity\UK\DrivingLicence * \ID3Global\Identity\Documents\Identity\US\DrivingLicence * \ID3Global\Identity\Documents\Identity\US\SocialSecurity * \ID3Global\Identity\Documents\Identity\US\IdentityCard * \ID3Global\Identity\Employment * \ID3Global\Identity\GlobalGeneric * \ID3Global\Identity\Images * \ID3Global\Identity\Location * \ID3Global\Identity\PersonalDetails\BirthInfo */ $personalDetails = new \ID3Global\Identity\PersonalDetails(); $personalDetails ->setTitle('Mr') ->setForeName('Dworkin') ->setMiddleName('John') ->setSurname('Barimen') ->setGender(ID3GlobalService::GENDER_MALE) ->setDateOfBirth(1922, 08, 20); $currentAddress = new \ID3Global\Identity\Address\FreeFormatAddress(); $currentAddress ->setCountry(ID3GlobalService::COUNTRY_NZ) ->setZipPostcode(90210) // You can set up to 8 address lines if required using ->setAddressLine3(), ->setAddressLine8() etc. ->setAddressLine1('Dungeon 1') ->setAddressLine2('Courts of Amber'); $addressContainer = new \ID3Global\Identity\Addresses(); $addressContainer ->setCurrentAddress($currentAddress); $contactDetails = new \ID3Global\Identity\ContactDetails(); $contactDetails ->setLandPhone(new \ID3Global\Identity\ContactDetails\LandTelephone(1234567890, false)) ->setMobilePhone(new \ID3Global\Identity\ContactDetails\MobileTelephone(1234567890)) ->setWorkPhone(new \ID3Global\Identity\ContactDetails\WorkTelephone(1234567890)) ->setEmail('dworkin@thepattern.net'); /** * $result will be one of the following: * - \ID3Global\Constants\Identity::IDENTITY_BAND_PASS * - \ID3Global\Constants\Identity::IDENTITY_BAND_REFER * - \ID3Global\Constants\Identity::IDENTITY_BAND_ALERT * * It is up to the implemenetation how these are handled. * An exception is thrown if the web service fails or cannot be contacted. */ $identity = new \ID3Global\Identity\Identity(); $identity ->setPersonalDetails($$personalDetails) ->setAddresses($addressContainer) ->setContactDetails($contactDetails); $id3Service = new \ID3Global\Services\GlobalAuthenticationService(); $result = $id3Service ->setIdentity($identity) ->verifyIdentity(); if($result === \ID3Global\Constants\Identity::IDENTITY_BAND_PASS) { // Identity is verified, continue processing }
decrypted/id3global-service 适用场景与选型建议
decrypted/id3global-service 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51.17k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 03 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「identity」 「ID3Global」 「GBG」 「GBG PLC」 「identity verification」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 decrypted/id3global-service 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 decrypted/id3global-service 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 decrypted/id3global-service 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Allows a PHP-powered website to communicate with the GBG ID3global API to verify identities. This library is not affiliated with GBG PLC in any way.
Acts as an adapter between Laravel Eloquent and GBG ID3global service
Identity authorizator class for Nette Framework
Identity ACL extension for Nette Framework
AXIUM Identity Symfony Bundle - Client d'authentification centralisée OAuth2/Keycloak
Laravel 中国身份证验证
统计信息
- 总下载量: 51.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-03-09