This commit is contained in:
KANE LAZENI 2026-02-24 00:35:46 +00:00
parent 8d48a1d12d
commit adc8fe66a6

View File

@ -64,7 +64,7 @@ class FacialVerificationAPI {
var_dump(
array(
"referenceImagePath" => $referenceImagePath,
"capturedImageBase64" => $capturedImageBase64,
// "capturedImageBase64" => $capturedImageBase64,
"photoAssureCrypte" => $_SESSION['photoAssureCrypte'],
"lienPhoto" => $_SESSION['lienPhoto'],
)
@ -84,19 +84,20 @@ class FacialVerificationAPI {
try {
$rekognitionClient = new Aws\Rekognition\RekognitionClient([
'version' => 'latest',
'region' => AWS_REGION,
'region' => 'us-west-2',
'credentials' => [
'key' => AWS_ACCESS_KEY_ID,
'secret' => AWS_SECRET_ACCESS_KEY
'key' => 'AKIA2O2PTXQ7XN5OATO3',
'secret' => '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'
]
]);
$referenceImageData = file_get_contents($referenceImagePath);
$capturedImageData = base64_decode(explode(',', $capturedImageBase64)[1]);
$result = $rekognitionClient->compareFaces([
'SourceImage' => ['Bytes' => $referenceImageData],
'TargetImage' => ['Bytes' => $capturedImageData],
'SourceImage' => ['Bytes' => $capturedImageData],
'TargetImage' => ['Bytes' => $referenceImageData],
'SimilarityThreshold' => 80
]);