Skip to content

Commit

Permalink
SMS Doğrulama Hatası Çözümü
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcesmecioglu committed Aug 2, 2021
1 parent 1a7dd57 commit 6202329
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"homepage": "https://github.com/furkankadioglu/efatura",
"license": "MIT",
"version": "1.9.2",
"version": "1.9.3",
"authors": [
{
"name": "Furkan Kadıoğlu",
Expand Down
32 changes: 31 additions & 1 deletion src/InvoiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,34 @@ public function sendUserInformationsData(UserInformations $userInformations = nu
return $body["data"];
}

/**
* Initialize SMS Verification
*
* @return boolean
*/

private function initializeSMSVerification()
{
$parameters = [
"cmd" => "EARSIV_PORTAL_TELEFONNO_SORGULA",
"callid" => Uuid::uuid1()->toString(),
"pageName" => "RG_BASITTASLAKLAR",
"token" => $this->token,
"jp" => "{}",
];

$body = $this->sendRequestAndGetBody(self::DISPATCH_PATH, $parameters);
$this->checkError($body);

if(!isset($body["data"]["telefon"]))
{
return false;
}

return true;
}


/**
* Send user informations data
*
Expand All @@ -735,9 +763,11 @@ public function sendUserInformationsData(UserInformations $userInformations = nu
*/
public function sendSMSVerification($phoneNumber)
{
$this->initializeSMSVerification();

$data = [
"CEPTEL" => $phoneNumber,
"KTEL" => false,
"KCEPTEL" => false,
"TIP" => ""
];

Expand Down

0 comments on commit 6202329

Please sign in to comment.