smile-identity-core 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b08d29788e9df7942697da8ef9391fdc7200e5d31ac8b0e6520649d9051fbc0
|
4
|
+
data.tar.gz: 4e27841299e6c26392883a14d38a72ae104195df8cc06492bb27457198a96e89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b08f43d9d9849048f18adb39ef3553c442cdf5aa2ccb4e77a97048df1b2b1a0b72a36fa2d8c0750e13177d9b7a2db987d7f3746c5218f771402da047721cc73b
|
7
|
+
data.tar.gz: febc9a1df0e0535fc93f3fc4d7562ee118f0f87031445da6ddc2ec2c91e5a9c52df27c05e8bc0e4db4377b81924e9f26e8b87b1594583e8554495923e898be54
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [2.2.3] - 2023-10-20
|
8
|
+
## Added
|
9
|
+
- Adds support for Enhanced Document Verification
|
10
|
+
|
7
11
|
## [Unreleased]
|
8
12
|
|
9
13
|
## [2.2.2] - 2023-10-05
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
smile-identity-core (2.2.
|
4
|
+
smile-identity-core (2.2.3)
|
5
5
|
rubyzip (~> 1.2, >= 1.2.3)
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
docile (1.4.0)
|
14
14
|
ethon (0.16.0)
|
15
15
|
ffi (>= 1.15.0)
|
16
|
-
ffi (1.
|
16
|
+
ffi (1.16.3)
|
17
17
|
json (2.5.1)
|
18
18
|
parallel (1.22.1)
|
19
19
|
parser (3.1.2.1)
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'smile-identity-core'
|
4
|
+
|
5
|
+
# See https://docs.smileidentity.com/server-to-server/ruby/products/enhanced_document-verification for
|
6
|
+
# how to setup and retrieve configuation values for the WebApi class.
|
7
|
+
|
8
|
+
# Initialize
|
9
|
+
partner_id = '<Put your partner ID here>'; # login to the Smile Identity portal to view your partner id
|
10
|
+
default_callback = '<Put your default callback url here>'
|
11
|
+
api_key = '<Put your API key here>'; # copy your API key from the Smile Identity portal
|
12
|
+
sid_server = '<0 | 1>'; # Use '0' for the sandbox server, use '1' for production server
|
13
|
+
|
14
|
+
connection = SmileIdentityCore::WebApi.new(partner_id, default_callback, api_key, sid_server)
|
15
|
+
|
16
|
+
# Create required tracking parameters
|
17
|
+
partner_params = {
|
18
|
+
user_id: '<put your unique ID for the user here>',
|
19
|
+
job_id: '<put your unique job ID here>',
|
20
|
+
job_type: 11
|
21
|
+
}
|
22
|
+
|
23
|
+
# Create image list
|
24
|
+
# image_type_id (Integer) - This infers to either a file or a base64 encoded image, but not both.
|
25
|
+
# 0 - Selfie image jpg or png (if you have the full path of the selfie)
|
26
|
+
# 2 - Selfie image jpg or png base64 encoded (if you have the base64image string of the selfie)
|
27
|
+
# 4 - Liveness image jpg or png (if you have the full path of the liveness image)
|
28
|
+
# 6 - Liveness image jpg or png base64 encoded (if you have the base64image string of the liveness image)
|
29
|
+
# 1 - Front of ID document image jpg or png (if you have the full path of the selfie)
|
30
|
+
# 3 - Front of ID document image jpg or png base64 encoded (if you have the base64image string of the selfie)
|
31
|
+
# 5 - Back of ID document image jpg or png (if you have the full path of the selfie)
|
32
|
+
# 7 - Back of ID document image jpg or png base64 encoded (if you have the base64image string of the selfie)
|
33
|
+
image_details = [
|
34
|
+
{
|
35
|
+
image_type_id: '<0 | 2>',
|
36
|
+
image: '<full path to selfie image or base64image string>'
|
37
|
+
},
|
38
|
+
{ # Not required if you don't require proof of life (note photo of photo check
|
39
|
+
# will still be performed on the uploaded selfie)
|
40
|
+
image_type_id: '<4 | 6>',
|
41
|
+
image: '<full path to liveness image or base64 image string>'
|
42
|
+
},
|
43
|
+
{
|
44
|
+
image_type_id: '<1 | 3>',
|
45
|
+
image: '<full path to front of id document image or base64image string>'
|
46
|
+
},
|
47
|
+
{ # Optional, only use if you're uploading the back of the id document image
|
48
|
+
image_type_id: '<5 | 7>',
|
49
|
+
image: '<full path to back of id document image or base64image string>'
|
50
|
+
}
|
51
|
+
]
|
52
|
+
|
53
|
+
# The ID Document Information
|
54
|
+
id_info = {
|
55
|
+
country: '<2-letter country code>', # The country where ID document was issued
|
56
|
+
id_type: '<id type>' # The ID document type
|
57
|
+
}
|
58
|
+
|
59
|
+
# Set options for the job
|
60
|
+
options = {
|
61
|
+
# Set to true if you want to get the job result in sync (in addition to the result
|
62
|
+
# been sent to your callback). If set to false, result is sent to callback url only.
|
63
|
+
return_job_status: '<true | false>',
|
64
|
+
# Set to true to receive all of the updates you would otherwise have received in your
|
65
|
+
# callback as opposed to only the final result. You must set return_job_status to true to use this flag.
|
66
|
+
return_history: '<true | false>',
|
67
|
+
# Set to true to receive links to the selfie and the photo it was compared to.
|
68
|
+
# You must set return_job_status to true to use this flag.
|
69
|
+
return_image_links: '<true |false>',
|
70
|
+
signature: true
|
71
|
+
}
|
72
|
+
|
73
|
+
# Submit the job
|
74
|
+
connection.submit_job(partner_params, image_details, id_info, options)
|
@@ -25,5 +25,9 @@ module SmileIdentityCore
|
|
25
25
|
# Performs due diligence by screening against global watchlists,
|
26
26
|
# politically exposed persons lists, and adverse media publications
|
27
27
|
AML = 10
|
28
|
+
# Verifies the authenticity of Document IDs and confirms their validity
|
29
|
+
# with an ID authority, and uses biometric checks to confirm they
|
30
|
+
# belong to the user.
|
31
|
+
ENHANCED_DOCUMENT_VERIFICATION = 11
|
28
32
|
end
|
29
33
|
end
|
@@ -85,16 +85,18 @@ module SmileIdentityCore
|
|
85
85
|
updated_id_info[:entered] = 'false' if !updated_id_info.key?(:entered) || id_info[:entered].empty?
|
86
86
|
|
87
87
|
# if it's a boolean
|
88
|
-
updated_id_info[:entered] = id_info[:entered].to_s
|
88
|
+
updated_id_info[:entered] = id_info[:entered].to_s
|
89
89
|
|
90
90
|
is_jt6 = @partner_params[:job_type].to_i == JobType::DOCUMENT_VERIFICATION
|
91
|
-
|
91
|
+
is_jt11 = @partner_params[:job_type].to_i == JobType::ENHANCED_DOCUMENT_VERIFICATION
|
92
|
+
keys = if is_jt6 || is_jt11
|
92
93
|
%i[country]
|
93
94
|
else
|
94
95
|
%i[country id_type id_number]
|
95
96
|
end
|
97
|
+
keys.push(:id_type) if is_jt11
|
96
98
|
|
97
|
-
if updated_id_info[:entered] == 'true' || is_jt6
|
99
|
+
if updated_id_info[:entered] == 'true' || is_jt6 || is_jt11
|
98
100
|
keys.each do |key|
|
99
101
|
raise ArgumentError, "Please make sure that #{key} is included in the id_info" if id_info[key].to_s.empty?
|
100
102
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smile-identity-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Smile Identity
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- examples/biometric_kyc.rb
|
173
173
|
- examples/business_verification.rb
|
174
174
|
- examples/document_verification.rb
|
175
|
+
- examples/enhanced_document_verification.rb
|
175
176
|
- examples/enhanced_kyc.rb
|
176
177
|
- examples/example-project/Gemfile
|
177
178
|
- examples/example-project/Gemfile.lock
|