| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * MIT License | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  | namespace SprykerEco\Zed\Computop\Business\Payment\Handler\Saver\Init; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | use Generated\Shared\Transfer\ComputopSofortInitResponseTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | use Generated\Shared\Transfer\QuoteTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | class SofortResponseSaver extends AbstractResponseSaver | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |      * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |      * @return \Generated\Shared\Transfer\QuoteTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |     public function save(QuoteTransfer $quoteTransfer) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |         $responseTransfer = $quoteTransfer->getPayment()->getComputopSofort()->getSofortInitResponse(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |         $this->setPaymentEntity($responseTransfer->getHeader()->getTransId()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |         if ($responseTransfer->getHeader()->getIsSuccess()) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |             $this->getTransactionHandler()->handleTransaction( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |                 function () use ($responseTransfer) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |                     $this->savePaymentComputopEntity($responseTransfer); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |                     $this->savePaymentComputopDetailEntity($responseTransfer); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |                     $this->savePaymentComputopOrderItemsEntities(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |                 } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |             ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |         return $quoteTransfer; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |      * @param \Generated\Shared\Transfer\ComputopSofortInitResponseTransfer $responseTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |     protected function savePaymentComputopEntity(ComputopSofortInitResponseTransfer $responseTransfer) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |         $paymentEntity = $this->getPaymentEntity(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |         $paymentEntity->setPayId($responseTransfer->getHeader()->getPayId()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |         $paymentEntity->setXId($responseTransfer->getHeader()->getXId()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |         $paymentEntity->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |      * @param \Generated\Shared\Transfer\ComputopSofortInitResponseTransfer $responseTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |     protected function savePaymentComputopDetailEntity(ComputopSofortInitResponseTransfer $responseTransfer) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |         $paymentEntityDetails = $this->getPaymentEntity()->getSpyPaymentComputopDetail(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |         $paymentEntityDetails->setAccountOwner($responseTransfer->getAccountOwner()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |         $paymentEntityDetails->setAccountBank($responseTransfer->getAccountBank()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |         $paymentEntityDetails->setBankAccountBic($responseTransfer->getBankAccountBic()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |         $paymentEntityDetails->setBankAccountIban($responseTransfer->getBankAccountIban()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |         $paymentEntityDetails->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |     protected function savePaymentComputopOrderItemsEntities() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |         foreach ($this->getPaymentEntity()->getSpyPaymentComputopOrderItems() as $item) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |             $item->setStatus($this->config->getOmsStatusCaptured()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |             $item->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  | } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  |  | 
            
                        
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths