-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from mitwork/dev
Sync main
- Loading branch information
Showing
34 changed files
with
413 additions
and
53 deletions.
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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
# История версий | ||
|
||
## Текущая версия | ||
## V1.0.3 | ||
|
||
- Переводы и локализация; | ||
- Дополнительные исключения `KalkanExtractionException`, `KalkanSignatureException`, `KalkanValidationException`; | ||
- Базовые события `DocumentSaved`, `DocumentSigned`, `DocumentRejected`. | ||
|
||
## V1.0.2 | ||
|
||
- Исправления тестов и документации; | ||
- Метод проверки статуса документов. | ||
|
||
## V1.0.1 | ||
|
||
- Исправления тестов и документации. | ||
|
||
## V1.0.0 | ||
|
||
- Реализованы базовые возможности. | ||
|
||
- Подписание и проверка XML данных; | ||
- Подписание и проверка бинарных данных (CMS); | ||
- Генерация QR-кодов. |
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,12 @@ | ||
<?php | ||
|
||
return [ | ||
'incorrect_base64_data' => 'Incorrect base64 data.', | ||
'incorrect_json_data' => 'Incorrect JSON data.', | ||
'incorrect_xml_data' => 'Incorrect XML data: :error.', | ||
'incorrect_ncanode_status' => 'Incorrect NCANode response :status - :message.', | ||
'ncanode_is_unavailable' => 'NCANode is unavailable - :error.', | ||
'signature_error' => 'Signature error - :error.', | ||
'validation_error' => 'Signature validation - :error.', | ||
'extraction_error' => 'Extraction error - :error.', | ||
]; |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'unable_to_save_document' => 'Unable to save document.', | ||
'unable_to_get_document' => 'Unable to get document.', | ||
'unable_to_process_document' => 'Unable to process document.', | ||
'document_not_found' => 'Document not found.', | ||
]; |
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,12 @@ | ||
<?php | ||
|
||
return [ | ||
'incorrect_base64_data' => 'Base64 деректері дұрыс емес.', | ||
'incorrect_json_data' => 'Дұрыс емес JSON деректері.', | ||
'incorrect_xml_data' => 'Дұрыс емес XML деректері.: :error.', | ||
'incorrect_ncanode_status' => 'Дұрыс емес жауап күйі :status - :message.', | ||
'ncanode_is_unavailable' => 'NCANode қызметі қолжетімсіз - :error.', | ||
'signature_error' => 'Деректерге қол қою қатесі - :error.', | ||
'validation_error' => 'Деректерді тексеру қатесі - :error.', | ||
'extraction_error' => 'Деректерді іздеу қатесі - :error.', | ||
]; |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'unable_to_save_document' => 'Құжатты сақтау мүмкін емес..', | ||
'unable_to_get_document' => 'Құжатты алу мүмкін емес.', | ||
'unable_to_process_document' => 'Құжатты өңдеу мүмкін емес.', | ||
'document_not_found' => 'Құжат табылмады.', | ||
]; |
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,12 @@ | ||
<?php | ||
|
||
return [ | ||
'incorrect_base64_data' => 'Некорректные base64 данные.', | ||
'incorrect_json_data' => 'Некорректные JSON данные.', | ||
'incorrect_xml_data' => 'Некорректные XML данные: :error.', | ||
'incorrect_ncanode_status' => 'Некорректный статус ответа :status - :message.', | ||
'ncanode_is_unavailable' => 'Сервис NCANode недоступен - :error.', | ||
'signature_error' => 'Ошибка подписания данных - :error.', | ||
'validation_error' => 'Ошибка проверки данных - :error.', | ||
'extraction_error' => 'Ошибка извлечения данных - :error.', | ||
]; |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'unable_to_save_document' => 'Невозможно сохранить документ.', | ||
'unable_to_get_document' => 'Невозможно получить документ.', | ||
'unable_to_process_document' => 'Невозможно обработать документ.', | ||
'document_not_found' => 'Документ не найден.', | ||
]; |
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,21 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Events; | ||
|
||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class DocumentRejected | ||
{ | ||
use Dispatchable, InteractsWithSockets; | ||
|
||
public int|string $id; | ||
|
||
public string $message; | ||
|
||
public function __construct($id, $message) | ||
{ | ||
$this->id = $id; | ||
$this->message = $message; | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class DocumentSaved | ||
{ | ||
use Dispatchable; | ||
|
||
public int|string $id; | ||
|
||
public function __construct($id) | ||
{ | ||
$this->id = $id; | ||
} | ||
} |
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,24 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Events; | ||
|
||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class DocumentSigned | ||
{ | ||
use Dispatchable, InteractsWithSockets; | ||
|
||
public int|string $id; | ||
|
||
public string $content; | ||
|
||
public string $signature; | ||
|
||
public function __construct($id, $content, $signature) | ||
{ | ||
$this->id = $id; | ||
$this->content = $content; | ||
$this->signature = $signature; | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Exceptions; | ||
|
||
use InvalidArgumentException; | ||
|
||
class KalkanExtractionException extends InvalidArgumentException | ||
{ | ||
public static function create(string|array $error): self | ||
{ | ||
if (is_array($error)) { | ||
$error = print_r($error, true); | ||
} | ||
|
||
return new static(__('kalkan::exceptions.extraction_error', ['error' => $error])); | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Exceptions; | ||
|
||
use InvalidArgumentException; | ||
|
||
class KalkanSignatureException extends InvalidArgumentException | ||
{ | ||
public static function create(string|array $error): self | ||
{ | ||
if (is_array($error)) { | ||
$error = print_r($error, true); | ||
} | ||
|
||
return new static(__('kalkan::exceptions.signature_error', ['error' => $error])); | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
|
||
namespace Mitwork\Kalkan\Exceptions; | ||
|
||
use InvalidArgumentException; | ||
|
||
class KalkanValidationException extends InvalidArgumentException | ||
{ | ||
public static function create(string|array $error): self | ||
{ | ||
if (is_array($error)) { | ||
$error = print_r($error, true); | ||
} | ||
|
||
return new static(__('kalkan::exceptions.validation_error', ['error' => $error])); | ||
} | ||
} |
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.