cancel
Showing results for 
Search instead for 
Did you mean: 

Paypal order appears to fail if customer registers for an account in checkout. Paypal issue

SOLVED

Paypal order appears to fail if customer registers for an account in checkout. Paypal issue

When a customer is going through checkout and decides to sign up for an account, when they go to pay with Paypal (it does not affect Stripe transaction) they get the following error (on a blank page) when they have pressed pay:

 

An error has happened during application run. See exception log for details.

 

If you then press the browser back button, it says "Payment complete. Click to go back to site." When you do that, back on the Magento store a red banner says "Order cant be completed" and takes you to the Review order page to place the order again. However the payment HAS gone through. Therefore we are getting loads of duplicate orders.

 

The error log at that time says:

 

[2023-04-28T14:46:27.907184+00:00] main.CRITICAL: Magento\Framework\Exception\NoSuchEntityException: Source item not found by source code: default and sku: SP75-1.0-0-CLS-5MTRS. in /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-inventory-source-deduction-api/Model/GetSourceItemBySourceCodeAndSku.php:59
Stack trace:
#0 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-inventory-source-deduction-api/Model/SourceDeductionService.php(87): Magento\InventorySourceDeductionApi\Model\GetSourceItemBySourceCodeAndSku->execute()
#1 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-inventory-shipping/Observer/SourceDeductionProcessor.php(115): Magento\InventorySourceDeductionApi\Model\SourceDeductionService->execute()
#2 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\InventoryShipping\Observer\SourceDeductionProcessor->execute()
#3 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\InventoryShipping\Observer\SourceDeductionProcessor\Interceptor->___callParent()
#4 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/m2epro/magento2-extension/Plugin/MSI/Magento/InventoryShipping/Observer/SourceDeductionProcessor.php(98): Magento\InventoryShipping\Observer\SourceDeductionProcessor\Interceptor->Magento\Framework\Interception{closure}()
#5 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/m2epro/magento2-extension/Plugin/AbstractPlugin.php(42): Ess\M2ePro\Plugin\MSI\Magento\InventoryShipping\Observer\SourceDeductionProcessor->process Execute()
#6 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/m2epro/magento2-extension/Plugin/MSI/Magento/InventoryShipping/Observer/SourceDeductionProcessor.php(86): Ess\M2ePro\Plugin\AbstractPlugin->execute()
#7 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Ess\M2ePro\Plugin\MSI\Magento\InventoryShipping\Observer\SourceDeductionProcessor->aroundExecute()
#8 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\InventoryShipping\Observer\SourceDeductionProcessor\Interceptor->Magento\Framework\Interception{closure}()
#9 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/InventoryShipping/Observer/SourceDeductionProcessor/Interceptor.php(23): Magento\InventoryShipping\Observer\SourceDeductionProcessor\Interceptor->___callPlugins()
#10 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\InventoryShipping\Observer\SourceDeductionProcessor\Interceptor->execute()
#11 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()
#12 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()
#13 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch()
#14 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Model/AbstractModel.php(837): Magento\Framework\Event\Manager\Proxy->dispatch()
#15 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Model/ResourceModel/Db/VersionControl/AbstractDb.php(56): Magento\Framework\Model\AbstractModel->afterSave()
#16 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(402): Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb->processAfterSaves()
#17 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save()
#18 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\ResourceModel\Order\Shipment\Interceptor->___callParent()
#19 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/mageworx/module-ordersgrid/Plugin/Synchronize.php(26): Magento\Sales\Model\ResourceModel\Order\Shipment\Interceptor->Magento\Framework\Interception{closure}()
#20 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): MageWorx\OrdersGrid\Plugin\Synchronize->aroundSave()
#21 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\ResourceModel\Order\Shipment\Interceptor->Magento\Framework\Interception{closure}()
#22 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Sales/Model/ResourceModel/Order/Shipment/Interceptor.php(32): Magento\Sales\Model\ResourceModel\Order\Shipment\Interceptor->___callPlugins()
#23 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-sales/Model/Order/ShipmentRepository.php(147): Magento\Sales\Model\ResourceModel\Order\Shipment\Interceptor->save()
#24 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Order\ShipmentRepository->save()
#25 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Order\ShipmentRepository\Interceptor->___callParent()
#26 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\ShipmentRepository\Interceptor->Magento\Framework\Interception{closure}()
#27 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Sales/Model/Order/ShipmentRepository/Interceptor.php(41): Magento\Sales\Model\Order\ShipmentRepository\Interceptor->___callPlugins()
#28 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-sales/Model/ShipOrder.php(224): Magento\Sales\Model\Order\ShipmentRepository\Interceptor->save()
#29 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-sales/Model/OrderMutex.php(45): Magento\Sales\Model\ShipOrder->createShipment()
#30 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-sales/Model/ShipOrder.php(163): Magento\Sales\Model\OrderMutex->execute()
#31 [internal function]: Magento\Sales\Model\ShipOrder->execute()
#32 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array()
#33 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process()
#34 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor\Interceptor->___callParent()
#35 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor\Interceptor->Magento\Framework\Interception{closure}()
#36 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Webapi/Controller/Rest/SynchronousRequestProcessor/Interceptor.php(23): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor\Interceptor->___callPlugins()
#37 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor\Interceptor->process()
#38 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#39 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#40 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()
#41 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#42 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#43 /var/www/vhosts/hilltop-products.co.uk/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#44 /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#45 /var/www/vhosts/hilltop-products.co.uk/htdocs/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#46 {main}

Next Magento\Framework\Exception\CouldNotSaveException: The shipment couldn't be saved. in /var/www/vhosts/hilltop-products.co.uk/htdocs/vendor/magento/module-sales/Model/Order/ShipmentRepository.php:150
Stack trace:

 

Thanks in advance!

Rick

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Paypal order appears to fail if customer registers for an account in checkout. Paypal issue

Hello @ricklees 

 

The error log you provided suggests that there might be an issue with the Magento 2 inventory management system. It appears that Magento is trying to find an item in the inventory with a specific SKU, but it cannot locate it.

 

To address this issue, you may try to follow the below steps:

 

  1. Check the inventory management system in Magento and make sure that all the items are correctly set up and that their SKU is correct.

  2. Check if the item mentioned in the error log, "SP75-1.0-0-CLS-5MTRS," is present in the inventory system.

  3. If the item is not present, add it to the inventory system, and make sure that its SKU is correct.

  4. If the item is present, double-check that the SKU is correct and try re-indexing the inventory management system.

  5. If the issue persists, consider disabling the Magento inventory management system and check if the issue persists.

  6. If none of these steps work, you may want to reach out to Magento support or the developer of any third-party extension you are using that could affect the inventory management system.

 

Additionally, you may want to review the Paypal integration configuration settings to make sure they are set up correctly and that there are no issues with the configuration that could cause the error.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

View solution in original post

1 REPLY 1

Re: Paypal order appears to fail if customer registers for an account in checkout. Paypal issue

Hello @ricklees 

 

The error log you provided suggests that there might be an issue with the Magento 2 inventory management system. It appears that Magento is trying to find an item in the inventory with a specific SKU, but it cannot locate it.

 

To address this issue, you may try to follow the below steps:

 

  1. Check the inventory management system in Magento and make sure that all the items are correctly set up and that their SKU is correct.

  2. Check if the item mentioned in the error log, "SP75-1.0-0-CLS-5MTRS," is present in the inventory system.

  3. If the item is not present, add it to the inventory system, and make sure that its SKU is correct.

  4. If the item is present, double-check that the SKU is correct and try re-indexing the inventory management system.

  5. If the issue persists, consider disabling the Magento inventory management system and check if the issue persists.

  6. If none of these steps work, you may want to reach out to Magento support or the developer of any third-party extension you are using that could affect the inventory management system.

 

Additionally, you may want to review the Paypal integration configuration settings to make sure they are set up correctly and that there are no issues with the configuration that could cause the error.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now