bytesfield/simple-kyc
Composer 安装命令:
composer require bytesfield/simple-kyc
包简介
A PHP package for Know Your Customer (KYC)
README 文档
README
Simple KYC
Description
A Know Your Customer (KYC) PHP Package to verify business's customer identity using SMILE IDENTITY, APPRUVE and CREDEQUITY KYC services. This service currently support countries like Nigeria(NG), Ghana(GH), Kenya(KE), Uganda(UG).
Installation
PHP 7.4+ and Composer are required.
To get the latest version of Simple-Kyc, simply require it.
composer require bytesfield/simple-kyc
Or add the following line to the require block of your composer.json file.
"bytesfield/simple-kyc": "1.0.*"
You'll then need to run composer install or composer update to download it and have the autoloader updated.
Configuration
Once simple-kyc is installed, you will need to add the following credentials gotten from the different KYC service providers to your .env. Click on their names it will redirect you to their websites where you can sign up and get there API KEYs.
If you are using a hosting service like heroku, ensure to add the above details to your configuration variables.
- SMILE IDENTITY Required
SMILE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; SMILE_PARTNER_ID = xxxx;
- APPRUVE Required
APPRUVE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
- CREDEQUITY Optional
CREDEQUITY_API_URL = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
Usage
require 'vendor/autoload.php'; //Exclude this when using Frameworks like Laravel etc. use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $response = $simpleKyc->verifyId($payload = []);
Supported Handlers:
SMILE, APPRUVE, CREDEQUITY;
The request will pass through simple-kyc's pipeline and return the result and the pipe that handled the verification request
Note all data used here are dummy data, to get test data you can visit the individual KYC service provider's websites and get data to test
For Nigeria (NG)
APPRUVE SERVICE
ID Verification
Supported ID Types Values:
NIN, BVN, DRIVERS_LICENSE, PASSPORT, TIN, VOTER_CARD;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'NG', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'middle_name' => 'Peter', 'date_of_birth' => '1982-05-20', ]; $response = $simpleKyc->verifyId($payload);
SMILE IDENTITY SERVICE
ID Verification
Supported ID Types Values:
NIN_SLIP, BVN, DRIVERS_LICENSE, CAC, TIN, VOTER_ID;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'NG', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'user_id': 'USER_UNIQUE_ID', 'company': 'COMPANY_NAME', //Include this for CAC ]; $response = $simpleKyc->verifyId($payload);
CREDEQUITY SERVICE
ID Verification
Supported ID Types Values:
NIN, BVN, DRIVERS_LICENSE;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '00000000000', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'NG', 'first_name' => 'KAYODE', 'last_name' => 'BABATUNDE', 'date_of_birth' => '24-11-1975', 'phone_number' => '1234567890', ]; $response = $simpleKyc->verifyId($payload);
For Ghana (GH)
SMILE IDENTITY SERVICE
ID Verification
Supported ID Types Values:
SSNIT, VOTER_ID, DRIVERS_LICENSE;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'GH', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'user_id' => 'USER_UNIQUE_ID', ]; $response = $simpleKyc->verifyId($payload);
APPRUVE SERVICE
ID Verification
Supported ID Types Values:
SSNIT, TIN, DRIVERS_LICENSE, PASSPORT, VOTER_CARD;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'GH', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'date_of_birth': '24-11-1975', ]; $response = $simpleKyc->verifyId($payload);
For Kenya (KE)
SMILE IDENTITY SERVICE
ID Verification
Supported ID Types Values:
ALIEN_CARD, NATIONAL_ID, PASSPORT;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'KE', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'user_id' => 'USER_UNIQUE_ID', ]; $response = $simpleKyc->verifyId($payload);
APPRUVE SERVICE
ID Verification
Supported ID Types Values:
NATIONAL_ID, KRA, PASSPORT;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'KE', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'date_of_birth' => "24-11-1975", ]; $response = $simpleKyc->verifyId($payload);
Credequity not supported for Kenya
For South Africa (ZA)
SMILE IDENTITY SERVICE
ID Verification
Supported ID Types Values:
NATIONAL_ID, NATIONAL_ID_NO_PHOTO;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'ZA', 'first_name' => 'Michael', 'last_name' => 'Olugbenga', 'user_id' => "USER_UNIQUE_ID", ]; $response = $simpleKyc->verifyId($payload);
Credequity and Appruve not supported for South Africa
For Uganda (UG)
APPRUVE SERVICE
ID Verification
Supported ID Types Values:
TELCO_SUBSCRIBER;
require 'vendor/autoload.php'; use Bytesfield\SimpleKyc\SimpleKyc; $simpleKyc = new SimpleKyc(); $payload = [ 'id' => '48126406145', 'id_type' => 'ID_TYPE_VALUE', 'country' => 'UG', 'phone_number' => '+256000000003', ]; $response = $simpleKyc->verifyId($payload);
Credequity and Smile not supported for Uganda
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email abrahamudele@gmail instead of using the issue tracker.
Credits
- Abraham Udele
Find me on Twitter. Linkedin.
License
The MIT License (MIT). Please see License File for more information.
bytesfield/simple-kyc 适用场景与选型建议
bytesfield/simple-kyc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 06 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「customer」 「Simple」 「business」 「kyc」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bytesfield/simple-kyc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bytesfield/simple-kyc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bytesfield/simple-kyc 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Customer handling for PHP applications.
Customers management for Symfony projects.
A simple library for make Lexer and Parsers to build a language
A simple library that allows transform any kind of data to native php data or whatever
A simple library that uses the hydration pattern to fill objects given different sources of data.
Business rules engine tools.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-15
