refactor: split buspro ApiClient into domain clients
This commit is contained in:
1 parent
0a55544ca8
commit
b755a6f43e
52 files changed
+805
-695
No files matched your search
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Voucher;
|
||||
|
||||
use App\BusProNet\ApiClient;
|
||||
use App\BusProNet\Client\VoucherClient;
|
||||
use App\BusProNet\Exception\ApiClientException;
|
||||
use App\BusProNet\Model\Notification;
|
||||
use App\Exception\VoucherSessionNotFoundException;
|
||||
@@ -31,7 +31,7 @@ class Step1Controller extends AbstractVoucherPurchaseController
|
||||
VoucherPurchaseSessionManager $sessionManager,
|
||||
VoucherThumbnailResolver $thumbnailResolver,
|
||||
private readonly VoucherTemplateProvider $templateProvider,
|
||||
private readonly ApiClient $apiClient,
|
||||
private readonly VoucherClient $voucherClient,
|
||||
private readonly ValidatorInterface $validator,
|
||||
private readonly LoggerInterface $logger,
|
||||
) {
|
||||
@@ -136,7 +136,7 @@ class Step1Controller extends AbstractVoucherPurchaseController
|
||||
$request->getSession()->save();
|
||||
|
||||
try {
|
||||
$preview = $this->apiClient->getVoucherPreview($dto);
|
||||
$preview = $this->voucherClient->getVoucherPreview($dto);
|
||||
} catch (ApiClientException $e) {
|
||||
$this->logger->error('Voucher preview failed', ['error' => $e->getMessage()]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user