From 3ed3abc0d218d46f6c23298f3306a84761c342dc Mon Sep 17 00:00:00 2001 From: Markus Klein Date: Fri, 2 Jul 2021 15:48:54 +0200 Subject: [PATCH] [FEATURE] Make verification auto-confirm configurable #9 --- src/Verification/Issuer.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Verification/Issuer.php b/src/Verification/Issuer.php index cf8c5b1..c885a00 100644 --- a/src/Verification/Issuer.php +++ b/src/Verification/Issuer.php @@ -34,7 +34,8 @@ class Issuer string $useremail, string $vtype, bool $isSkillSet = false, - int $campaignId = 0 + int $campaignId = 0, + bool $autoConfirm = true ): array { if ($isSkillSet) { $requestData['SkillSetId'] = $ID; @@ -45,7 +46,7 @@ class Issuer $requestData['Level'] = $vtype; $requestData['VerifierId'] = $this->settings->getVerifierID(); $requestData['Username'] = $useremail; - $requestData['AutoConfirm'] = true; + $requestData['AutoConfirm'] = $autoConfirm; if ($campaignId) { $requestData['CampaignId'] = $campaignId; } @@ -86,9 +87,10 @@ class Issuer string $useremail, string $vtype, bool $isSkillSet = false, - int $campaignId = 0 + int $campaignId = 0, + bool $autoConfirm = true ): ResponseInterface { - $requestData = $this->generateSignedRequestData($skillID, $useremail, $vtype, $isSkillSet, $campaignId); + $requestData = $this->generateSignedRequestData($skillID, $useremail, $vtype, $isSkillSet, $campaignId, $autoConfirm); $client = new \GuzzleHttp\Client(); $request = new Request(