-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sdk 2357 php failure receipt error details #355
Merged
mehmet-yoti
merged 11 commits into
SDK-2377-php-add-failure-reason-info-to-idv-get-session-results
from
SDK-2357-php-failure-receipt-error-details
Jun 24, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d2f500c
SDK-2357 Added Error Reason to Digital Identity
mehmet-yoti 3dddfa4
SDK-2357 removed api key from home controller in docsan example
mehmet-yoti f488e9e
SDK-2357 removed api key from home controller in docsan example
mehmet-yoti b5e5f87
SDK-2357 update for 7.4 hint
mehmet-yoti 1033647
Merge branch 'SDK-2265' into SDK-2357-php-failure-receipt-error-details
mehmet-yoti 067f855
SDK-2357 Update error reason to match api model
mehmet-yoti 01f0bcd
Merge branch 'SDK-2265' into SDK-2357-php-failure-receipt-error-details
mehmet-yoti 1ae57b1
SDK-2357 updated requirements_not_met_details to match api
mehmet-yoti 823eca6
SDK-2357 added validations to classes
mehmet-yoti ed1cda4
SDK-2357 added validations to classes
mehmet-yoti 2952377
Merge branch 'SDK-2377-php-add-failure-reason-info-to-idv-get-session…
mehmet-yoti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ coverage | |
.scannerwork | ||
|
||
.DS_Store | ||
.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"php":"8.1.29","version":"3.59.3:v3.59.3#30ba9ecc2b0e5205e578fe29973c15653d9bfd29","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"no_unused_imports":true,"ordered_imports":{"imports_order":["const","class","function"]},"php_unit_fqcn_annotation":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true},"hashes":{"\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder861\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3196\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10280\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2372\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder12059\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"01fd3c6b4102578a5cbe7b9ca5a9620b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder4216\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"2b29b8fd1369f029fdd2626aff9574a1","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7923\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"a92ce4d8cf8cba9fc31b0b862a238e7d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9888\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"99cf5679ad3fbe693f1318efc4c7562e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7837\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder5368\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9615\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"fa7416c72cb9a21e375a580d0711b4a3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2220\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"3f1b675e645966f11d6fe283ff3d1a5c","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10144\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7956\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0"}} | ||
{"php":"8.1.29","version":"3.59.3:v3.59.3#30ba9ecc2b0e5205e578fe29973c15653d9bfd29","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"no_unused_imports":true,"ordered_imports":{"imports_order":["const","class","function"]},"php_unit_fqcn_annotation":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true},"hashes":{"\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder861\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder3196\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10280\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"6df4324fbc01516f544e380a2fcdad1d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2372\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"81fbf5d555938c2c1693fa70c5d2f06b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder12059\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"01fd3c6b4102578a5cbe7b9ca5a9620b","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder4216\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"2b29b8fd1369f029fdd2626aff9574a1","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7923\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"a92ce4d8cf8cba9fc31b0b862a238e7d","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9888\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"99cf5679ad3fbe693f1318efc4c7562e","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7837\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder5368\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder9615\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"fa7416c72cb9a21e375a580d0711b4a3","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder2220\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"3f1b675e645966f11d6fe283ff3d1a5c","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder10144\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/FailureReasonResponse.php":"9f3471f97753fd479ff323dbab8f8ff8","\/private\/var\/folders\/hs\/kw0d0_0d2kj8xl5yd5_t2rz40000gn\/T\/PHP CS Fixertemp_folder7956\/src\/DocScan\/Session\/Retrieve\/IdentityProfile\/RequirementNotMetDetails.php":"29258793b15beceaafceef4b742beca0"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Yoti\Identity; | ||
|
||
class ErrorReason | ||
{ | ||
/** | ||
* @var RequirementNotMetDetails | ||
*/ | ||
private $requirementNotMetDetails; | ||
|
||
/** | ||
* @param array<int, array<string, string>> $data | ||
*/ | ||
public function __construct(array $data) | ||
{ | ||
if (isset($data[0])) { | ||
$this->requirementNotMetDetails = new RequirementNotMetDetails($data); | ||
} else { | ||
$this->requirementNotMetDetails = new RequirementNotMetDetails([[ | ||
"failure_type" => '', | ||
"details" => '', | ||
"audit_id" => '', | ||
"document_country_iso_code" => '', | ||
"document_type" => '' | ||
]]); | ||
} | ||
} | ||
|
||
/** | ||
* @return RequirementNotMetDetails | ||
*/ | ||
public function getRequirementNotMetDetails(): RequirementNotMetDetails | ||
{ | ||
return $this->requirementNotMetDetails; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
|
||
namespace Yoti\Identity; | ||
|
||
class RequirementNotMetDetails | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $failureType; | ||
/** | ||
* @var string | ||
*/ | ||
private $documentType; | ||
/** | ||
* @var string | ||
*/ | ||
private $documentCountryIsoCode; | ||
/** | ||
* @var string | ||
*/ | ||
private $auditId; | ||
/** | ||
* @var string | ||
*/ | ||
private $details; | ||
|
||
/** | ||
* @param array<int, array<string, string>> $data | ||
*/ | ||
public function __construct(array $data) | ||
{ | ||
$this->failureType = $data[0]["failure_type"] ?? ''; | ||
$this->details = $data[0]["details"] ?? ''; | ||
$this->auditId = $data[0]["audit_id"] ?? ''; | ||
$this->documentCountryIsoCode = $data[0]["document_country_iso_code"] ?? ''; | ||
$this->documentType = $data[0]["document_type"] ?? ''; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getFailureType(): string | ||
{ | ||
return $this->failureType; | ||
} | ||
/** | ||
* @return string | ||
*/ | ||
public function getDetails(): string | ||
{ | ||
return $this->details; | ||
} | ||
/** | ||
* @return string | ||
*/ | ||
public function getAuditId(): string | ||
{ | ||
return $this->auditId; | ||
} | ||
/** | ||
* @return string | ||
*/ | ||
public function getDocumentCountryIsoCode(): string | ||
{ | ||
return $this->documentCountryIsoCode; | ||
} | ||
/** | ||
* @return string | ||
*/ | ||
public function getDocumentType(): string | ||
{ | ||
return $this->documentType; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the fields might not always be present in the $data array. Perhaps better to set these initially as
null
.