Skip to content

Commit 5dea680

Browse files
authored
Merge pull request #245 from getyoti/release/3.7.0
Release/3.7.0
2 parents 9ed7f42 + 649dec4 commit 5dea680

File tree

140 files changed

+5184
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+5184
-123
lines changed

.github/workflows/tests.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757

5858
- run: composer test
5959

60-
- run: composer lint
61-
6260
guzzle:
6361
name: Unit Tests With Guzzle 6 (php ${{ matrix.php-version }})
6462
runs-on: ubuntu-latest
@@ -87,8 +85,6 @@ jobs:
8785

8886
- run: composer test
8987

90-
- run: composer lint
91-
9288
protobuf:
9389
name: Unit Tests With Protobuf C Extension 3.13 (php ${{ matrix.php-version }})
9490
runs-on: ubuntu-latest
@@ -116,5 +112,3 @@ jobs:
116112

117113
- run: composer test
118114

119-
- run: composer lint
120-

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "yoti/yoti-php-sdk",
33
"description": "Yoti SDK for quickly integrating your PHP backend with Yoti",
4-
"version": "3.6.0",
4+
"version": "3.7.0",
55
"keywords": [
66
"yoti",
77
"sdk"

examples/doc-scan/app/Http/Controllers/HomeController.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
use Illuminate\Http\Request;
66
use Illuminate\Routing\Controller as BaseController;
77
use Yoti\DocScan\DocScanClient;
8+
use Yoti\DocScan\Session\Create\Check\Advanced\RequestedFuzzyMatchingStrategy;
9+
use Yoti\DocScan\Session\Create\Check\Advanced\RequestedSearchProfileSources;
810
use Yoti\DocScan\Session\Create\Check\RequestedDocumentAuthenticityCheckBuilder;
911
use Yoti\DocScan\Session\Create\Check\RequestedFaceMatchCheckBuilder;
1012
use Yoti\DocScan\Session\Create\Check\RequestedIdDocumentComparisonCheckBuilder;
1113
use Yoti\DocScan\Session\Create\Check\RequestedLivenessCheckBuilder;
1214
use Yoti\DocScan\Session\Create\Check\RequestedThirdPartyIdentityCheckBuilder;
15+
use Yoti\DocScan\Session\Create\Check\RequestedWatchlistAdvancedCaCheckBuilder;
16+
use Yoti\DocScan\Session\Create\Check\RequestedWatchlistScreeningCheckBuilder;
17+
use Yoti\DocScan\Session\Create\Check\RequestedWatchlistScreeningConfigBuilder;
18+
use Yoti\DocScan\Session\Create\Check\RequestedYotiAccountWatchlistAdvancedCaConfigBuilder;
1319
use Yoti\DocScan\Session\Create\Filters\Orthogonal\OrthogonalRestrictionsFilterBuilder;
1420
use Yoti\DocScan\Session\Create\Filters\RequiredIdDocumentBuilder;
1521
use Yoti\DocScan\Session\Create\Filters\RequiredSupplementaryDocumentBuilder;
@@ -23,6 +29,11 @@ class HomeController extends BaseController
2329
{
2430
public function show(Request $request, DocScanClient $client)
2531
{
32+
$watchScreeningConfig = (new RequestedWatchlistScreeningConfigBuilder())
33+
->withSanctionsCategory()
34+
->withAdverseMediaCategory()
35+
->build();
36+
2637
$sessionSpec = (new SessionSpecificationBuilder())
2738
->withClientSessionTokenTtl(600)
2839
->withResourcesTtl(90000)
@@ -49,6 +60,11 @@ public function show(Request $request, DocScanClient $client)
4960
(new RequestedThirdPartyIdentityCheckBuilder())
5061
->build()
5162
)
63+
->withRequestedCheck(
64+
(new RequestedWatchlistScreeningCheckBuilder())
65+
->withConfig($watchScreeningConfig)
66+
->build()
67+
)
5268
->withRequestedTask(
5369
(new RequestedTextExtractionTaskBuilder())
5470
->withManualCheckAlways()

examples/doc-scan/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"fideloper/proxy": "^4.2",
88
"fruitcake/laravel-cors": "^1.0",
99
"guzzlehttp/guzzle": "^6.3",
10-
"laravel/framework": "^7.0",
11-
"laravel/tinker": "^2.0",
10+
"laravel/framework": "^8.0",
11+
"laravel/tinker": "^2.3.0",
1212
"yoti/yoti-php-sdk": "^3.0"
1313
},
1414
"require-dev": {
Lines changed: 80 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
<table class="table table-striped">
22
<tbody>
3-
<tr>
4-
<td>ID</td>
5-
<td>{{ $check->getId() }}</td>
6-
</tr>
7-
<tr>
8-
<td>State</td>
9-
<td>
3+
<tr>
4+
<td>ID</td>
5+
<td>{{ $check->getId() }}</td>
6+
</tr>
7+
<tr>
8+
<td>State</td>
9+
<td>
1010
<span class="badge badge-{{ $check->getState() == 'DONE' ? 'success' : 'secondary' }}">
1111
{{ $check->getState() }}
1212
</span>
13-
</td>
14-
</tr>
15-
<tr>
16-
<td>Created</td>
17-
<td>{{ $check->getCreated()->format('r') }}</td>
18-
</tr>
19-
<tr>
20-
<td>Last Updated</td>
21-
<td>{{ $check->getLastUpdated()->format('r') }}</td>
22-
</tr>
23-
<tr>
24-
<td>Resources Used</td>
25-
<td>{{ implode(', ', $check->getResourcesUsed()) }}</td>
26-
</tr>
13+
</td>
14+
</tr>
15+
<tr>
16+
<td>Created</td>
17+
<td>{{ $check->getCreated()->format('r') }}</td>
18+
</tr>
19+
<tr>
20+
<td>Last Updated</td>
21+
<td>{{ $check->getLastUpdated()->format('r') }}</td>
22+
</tr>
23+
<tr>
24+
<td>Resources Used</td>
25+
<td>{{ implode(', ', $check->getResourcesUsed()) }}</td>
26+
</tr>
2727

2828

29-
@if ($check->getReport())
29+
@if ($check->getReport())
3030

3131
@if ($check->getReport()->getRecommendation())
32-
<tr>
33-
<td>Recommendation</td>
34-
<td>
35-
<table class="table table-bordered">
36-
<tbody>
32+
<tr>
33+
<td>Recommendation</td>
34+
<td>
35+
<table class="table table-bordered">
36+
<tbody>
3737
<tr>
3838
<td>Value</td>
3939
<td>{{ $check->getReport()->getRecommendation()->getValue() }}</td>
@@ -46,60 +46,60 @@
4646
<td>Recovery Suggestion</td>
4747
<td>{{ $check->getReport()->getRecommendation()->getRecoverySuggestion() }}</td>
4848
</tr>
49-
</tbody>
50-
</table>
51-
</td>
52-
</tr>
49+
</tbody>
50+
</table>
51+
</td>
52+
</tr>
5353
@endif
5454

5555
@if (count($check->getReport()->getBreakdown()) > 0)
56-
<tr>
57-
<td>Breakdown</td>
58-
<td>
59-
@foreach ($check->getReport()->getBreakdown() as $breakdown)
60-
<table class="table table-bordered">
61-
<tbody>
62-
<tr>
63-
<td>Sub Check</td>
64-
<td>{{ $breakdown->getSubCheck() }}</td>
65-
</tr>
66-
<tr>
67-
<td>Result</td>
68-
<td>{{ $breakdown->getResult() }}</td>
69-
</tr>
70-
@if (count($breakdown->getDetails()) > 0)
71-
<tr>
72-
<td>Details</td>
73-
<td>
74-
<table class="table table-striped">
75-
<tbody>
76-
@foreach ($breakdown->getDetails() as $details)
77-
<tr>
78-
<td>{{ $details->getName() }}</td>
79-
<td>{{ $details->getValue() }}</td>
80-
</tr>
81-
@endforeach
82-
</tbody>
83-
</table>
84-
</td>
85-
</tr>
86-
@endif
87-
</tbody>
88-
</table>
89-
@endforeach
90-
</td>
91-
</tr>
56+
<tr>
57+
<td>Breakdown</td>
58+
<td>
59+
@foreach ($check->getReport()->getBreakdown() as $breakdown)
60+
<table class="table table-bordered">
61+
<tbody>
62+
<tr>
63+
<td>Sub Check</td>
64+
<td>{{ $breakdown->getSubCheck() }}</td>
65+
</tr>
66+
<tr>
67+
<td>Result</td>
68+
<td>{{ $breakdown->getResult() }}</td>
69+
</tr>
70+
@if (count($breakdown->getDetails()) > 0)
71+
<tr>
72+
<td>Details</td>
73+
<td>
74+
<table class="table table-striped">
75+
<tbody>
76+
@foreach ($breakdown->getDetails() as $details)
77+
<tr>
78+
<td>{{ $details->getName() }}</td>
79+
<td>{{ $details->getValue() }}</td>
80+
</tr>
81+
@endforeach
82+
</tbody>
83+
</table>
84+
</td>
85+
</tr>
86+
@endif
87+
</tbody>
88+
</table>
89+
@endforeach
90+
</td>
91+
</tr>
9292
@endif
9393

94-
@endif
94+
@endif
9595

96-
@if (count($check->getGeneratedMedia()) > 0)
96+
@if (count($check->getGeneratedMedia()) > 0)
9797
<tr>
9898
<td>Generated Media</td>
9999
<td>
100100
@foreach ($check->getGeneratedMedia() as $media)
101-
<table class="table table-striped">
102-
<tbody>
101+
<table class="table table-striped">
102+
<tbody>
103103
<tr>
104104
<td>ID</td>
105105
<td><a href="/media/{{ $media->getId() }}">{{ $media->getId() }}</a></td>
@@ -108,12 +108,18 @@
108108
<td>Type</td>
109109
<td>{{ $media->getType() }}</td>
110110
</tr>
111-
</tbody>
112-
</table>
111+
</tbody>
112+
</table>
113113
@endforeach
114114
</td>
115115
</tr>
116-
@endif
116+
@endif
117+
118+
@if ($check->getType() == 'WATCHLIST_ADVANCED_CA' && $check->getReport() != null)
119+
<tr>
120+
@include('partial/watchlist_advanced_raw_media', ['check' => $check])
121+
</tr>
122+
@endif
117123

118124
</tbody>
119125
</table>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<tr>
2+
<td>Raw Results Media</td>
3+
@if($check->getReport() != null)
4+
@if($check->getReport()->getWatchlistSummary() != null)
5+
<table class="table table-striped">
6+
<tbody>
7+
<tr>
8+
<td>ID</td>
9+
<td>
10+
<a href="/media/{{$check->getReport()->getWatchlistSummary()->getRawResults()->getMedia()->getId()}}">
11+
{{$check->getReport()->getWatchlistSummary()->getRawResults()->getMedia()->getId()}}
12+
</a>
13+
</td>
14+
</tr>
15+
<tr>
16+
<td>Type</td>
17+
<td>{{$check->getReport()->getWatchlistSummary()->getRawResults()->getMedia()->getType()}}</td>
18+
</tr>
19+
</tbody>
20+
</table>
21+
@endif
22+
@endif
23+
</tr>

examples/doc-scan/resources/views/success.blade.php

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,53 @@
219219
</div>
220220
</div>
221221
@endif
222+
223+
@if (count($sessionResult->getWatchlistScreeningChecks()) > 0)
224+
<div class="card">
225+
<div class="card-header" id="watchlist-screening-checks">
226+
<h3 class="mb-0">
227+
<button class="btn btn-link" type="button" data-toggle="collapse"
228+
data-target="#collapse-watchlist-screening-checks" aria-expanded="true"
229+
aria-controls="collapse-watchlist-screening-checks">
230+
Watchlist Screening Checks
231+
</button>
232+
</h3>
233+
</div>
234+
235+
<div id="collapse-watchlist-screening-checks" class="collapse"
236+
aria-labelledby="watchlist-screening-checks">
237+
<div class="card-body">
238+
@foreach($sessionResult->getWatchlistScreeningChecks() as $check)
239+
@include('partial/check', ['check' => $check])
240+
@endforeach
241+
</div>
242+
</div>
243+
</div>
244+
@endif
245+
246+
@if (count($sessionResult->getWatchlistAdvancedCaChecks()) > 0)
247+
<div class="card">
248+
<div class="card-header" id="watchlist-advanced-ca-checks">
249+
<h3 class="mb-0">
250+
<button class="btn btn-link" type="button" data-toggle="collapse"
251+
data-target="#collapse-watchlist-advanced-ca-checks"
252+
aria-expanded="true"
253+
aria-controls="collapse-watchlist-advanced-ca-checks">
254+
Watchlist Advanced Checks
255+
</button>
256+
</h3>
257+
</div>
258+
259+
<div id="collapse-watchlist-advanced-ca-checks" class="collapse"
260+
aria-labelledby="watchlist-advanced-ca-checks">
261+
<div class="card-body">
262+
@foreach($sessionResult->getWatchlistAdvancedCaChecks() as $check)
263+
@include('partial/check', ['check' => $check])
264+
@endforeach
265+
</div>
266+
</div>
267+
</div>
268+
@endif
222269
</div>
223270
</div>
224271
</div>
@@ -619,7 +666,7 @@ class="badge badge-primary">{{ $document->getIssuingCountry() }}</span></h3>
619666

620667
<div class="accordion mt-3">
621668

622-
@if (count($livenessResource->getFrames()) > 0)
669+
@if ($livenessResource->getFrames() != null && count($livenessResource->getFrames()) > 0)
623670
<div class="card">
624671
<div class="card-header" id="liveness-{{ $livenessNum }}-frames">
625672
<h3 class="mb-0">

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sonar.organization = getyoti
33

44
sonar.projectKey = getyoti:php
55
sonar.projectName = PHP SDK
6-
sonar.projectVersion = 3.6.0
6+
sonar.projectVersion = 3.7.0
77

88
sonar.language = php
99
sonar.sources=src

src/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Constants
2525
public const SDK_IDENTIFIER = 'PHP';
2626

2727
/** Default SDK version */
28-
public const SDK_VERSION = '3.6.0';
28+
public const SDK_VERSION = '3.7.0';
2929

3030
/** Base url for connect page (user will be redirected to this page eg. baseurl/app-id) */
3131
public const CONNECT_BASE_URL = 'https://www.yoti.com/connect';

0 commit comments

Comments
 (0)