Compare commits

..

No commits in common. "master" and "DDB-1753" have entirely different histories.

6 changed files with 37 additions and 39 deletions

View File

@ -4,12 +4,12 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y wget libgtk-3-0 libpcsclite-dev pcscd curl software-properties-common git zip bash RUN apt update && apt install -y wget libgtk-3-0 libpcsclite-dev pcscd curl software-properties-common git zip bash
RUN add-apt-repository ppa:ondrej/php RUN add-apt-repository ppa:ondrej/php
RUN apt update && apt install -y \ RUN apt update && apt install -y \
php8.3-fpm \ php-fpm \
php8.3-curl \ php-curl \
php8.3 \ php \
php8.3-common \ php-common \
php8.3-cli \ php-cli \
php8.3-xml \ php-xml \
gnupg \ gnupg \
g++ \ g++ \
procps \ procps \
@ -55,7 +55,7 @@ RUN apt update && apt install -y okular-csp-utils
RUN mkdir -p /root/.config RUN mkdir -p /root/.config
COPY license.key /license.key COPY license.key /license.key
# RUN echo Y | pdfcpro install-license /license.key RUN echo Y | pdfcpro install-license /license.key
COPY Inter-Bold.ttf /usr/local/share/fonts/Inter-Bold.ttf COPY Inter-Bold.ttf /usr/local/share/fonts/Inter-Bold.ttf
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

View File

@ -4,12 +4,12 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y wget libgtk-3-0 libpcsclite-dev pcscd curl software-properties-common git zip bash RUN apt update && apt install -y wget libgtk-3-0 libpcsclite-dev pcscd curl software-properties-common git zip bash
RUN add-apt-repository ppa:ondrej/php RUN add-apt-repository ppa:ondrej/php
RUN apt update && apt install -y \ RUN apt update && apt install -y \
php8.3-fpm \ php-fpm \
php8.3-curl \ php-curl \
php8.3 \ php \
php8.3-common \ php-common \
php8.3-cli \ php-cli \
php8.3-xml \ php-xml \
gnupg \ gnupg \
g++ \ g++ \
procps \ procps \

View File

@ -6,15 +6,13 @@ namespace App\SignDocument\Api;
use App\Infrastructure\External\Api\AbstractApi; use App\Infrastructure\External\Api\AbstractApi;
use App\Infrastructure\External\Api\BinaryStringFileResult; use App\Infrastructure\External\Api\BinaryStringFileResult;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions; use GuzzleHttp\RequestOptions;
class Api extends AbstractApi class Api extends AbstractApi
{ {
public ApiParams $apiParams; public ApiParams $apiParams;
public function send(string $token, string $path, int $order): array public function send(string $token, string $path, int $batch): array
{ {
$params = [ $params = [
RequestOptions::HEADERS => [ RequestOptions::HEADERS => [
@ -24,7 +22,7 @@ class Api extends AbstractApi
RequestOptions::MULTIPART => [ RequestOptions::MULTIPART => [
[ [
'name' => 'file', 'name' => 'file',
'contents' => file_get_contents($path), 'contents' => fopen($path, 'r'),
'filename' => $path, 'filename' => $path,
'headers' => [ 'headers' => [
'Content-Type' => '<Content-type header>', 'Content-Type' => '<Content-type header>',
@ -37,7 +35,7 @@ class Api extends AbstractApi
], ],
]; ];
$response = $this->client->post(sprintf('%s%s%s', $this->apiParams->endPointUrl, '/api/v1/documents/upload/carrier/order/', $order), $params); $response = $this->client->post(sprintf('%s%s%s', $this->apiParams->endPointUrl, '/api/v1/document/upload/batch/', $batch), $params);
return $this->responseHandler->setResponse($response)->getContentJsonToArray(); return $this->responseHandler->setResponse($response)->getContentJsonToArray();
} }

View File

@ -9,6 +9,6 @@ use App\Infrastructure\Http\RequestDtoInterface;
class SignRequest implements RequestDtoInterface class SignRequest implements RequestDtoInterface
{ {
public string $url; public string $url;
public int $order; public int $batch;
public string $apiToken; public string $apiToken;
} }

View File

@ -34,7 +34,7 @@ class SignService
$this->sign($document->tempFileName); $this->sign($document->tempFileName);
$response = $this->api->send($token, $document->tempFileName . '_sign.pdf', $request->order); $response = $this->api->send($token, $document->tempFileName . '_sign.pdf', $request->batch);
$this->removeExistingDocumentService->removeExistingDocument($document); $this->removeExistingDocumentService->removeExistingDocument($document);

View File

@ -1,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