| @@ -86,13 +86,8 @@ | ||
| 86 | 86 | * @var CoreHelper |
| 87 | 87 | */ |
| 88 | 88 | private $coreHelper; |
| 89 | 89 | |
| 90 | - /** | |
| 91 | - * @var ConsignPasswordSynchronizer | |
| 92 | - */ | |
| 93 | - private $consignPasswordSynchronizer; | |
| 94 | - | |
| 95 | 90 | public function __construct( |
| 96 | 91 | Soap\Client $soapApiClient, |
| 97 | 92 | OrderValidatorFactory $orderValidatorFactory, |
| 98 | 93 | Log\ILogger $logger, |
| @@ -104,10 +99,9 @@ | ||
| 104 | 99 | PacketActionsCommonLogic $commonLogic, |
| 105 | 100 | CustomsDeclaration\Repository $customsDeclarationRepository, |
| 106 | 101 | PacketSynchronizer $packetSynchronizer, |
| 107 | 102 | ModuleHelper $moduleHelper, |
| 108 | - CoreHelper $coreHelper, | |
| 109 | - ConsignPasswordSynchronizer $consignPasswordSynchronizer | |
| 103 | + CoreHelper $coreHelper | |
| 110 | 104 | ) { |
| 111 | 105 | $this->soapApiClient = $soapApiClient; |
| 112 | 106 | $this->orderValidator = $orderValidatorFactory->create(); |
| 113 | 107 | $this->logger = $logger; |
| @@ -120,9 +114,8 @@ | ||
| 120 | 114 | $this->customsDeclarationRepository = $customsDeclarationRepository; |
| 121 | 115 | $this->packetSynchronizer = $packetSynchronizer; |
| 122 | 116 | $this->moduleHelper = $moduleHelper; |
| 123 | 117 | $this->coreHelper = $coreHelper; |
| 124 | - $this->consignPasswordSynchronizer = $consignPasswordSynchronizer; | |
| 125 | 118 | } |
| 126 | 119 | |
| 127 | 120 | /** |
| 128 | 121 | * Process action |
| @@ -315,11 +308,8 @@ | ||
| 315 | 308 | |
| 316 | 309 | return $submissionResult; |
| 317 | 310 | } |
| 318 | 311 | |
| 319 | - $shouldScheduleConsignPasswordFetch = false; | |
| 320 | - $consignPasswordFetchImmediate = false; | |
| 321 | - | |
| 322 | 312 | $response = $this->soapApiClient->createPacket( $createPacketData ); |
| 323 | 313 | if ( $response->hasFault() ) { |
| 324 | 314 | $record = new Log\Record(); |
| 325 | 315 | $record->action = Log\Record::ACTION_PACKET_SENDING; |
| @@ -364,11 +354,8 @@ | ||
| 364 | 354 | $this->packetSynchronizer->syncStatus( $order ); |
| 365 | 355 | } else { |
| 366 | 356 | as_enqueue_async_action( self::HOOK_PACKET_STATUS_SYNC, [ $order->getNumber() ] ); |
| 367 | 357 | } |
| 368 | - | |
| 369 | - $shouldScheduleConsignPasswordFetch = true; | |
| 370 | - $consignPasswordFetchImmediate = $immediatePacketStatusCheck; | |
| 371 | 358 | } |
| 372 | 359 | |
| 373 | 360 | $submissionResult->increaseLogsCount(); |
| 374 | 361 | $this->logger->add( $record ); |
| @@ -373,12 +360,8 @@ | ||
| 373 | 360 | $submissionResult->increaseLogsCount(); |
| 374 | 361 | $this->logger->add( $record ); |
| 375 | 362 | $order->updateApiErrorMessage( $errorMessage ); |
| 376 | 363 | $this->orderRepository->save( $order ); |
| 377 | - | |
| 378 | - if ( $shouldScheduleConsignPasswordFetch ) { | |
| 379 | - $this->consignPasswordSynchronizer->schedule( $order, $consignPasswordFetchImmediate ); | |
| 380 | - } | |
| 381 | 364 | } else { |
| 382 | 365 | $submissionResult->increaseIgnoredCount(); |
| 383 | 366 | } |
| 384 | 367 | |