Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

placing order fails because the module assumes there are deliveries while there are none #11

Open
darinda opened this issue Sep 5, 2023 · 1 comment · May be fixed by #12
Open

placing order fails because the module assumes there are deliveries while there are none #11

darinda opened this issue Sep 5, 2023 · 1 comment · May be fixed by #12

Comments

@darinda
Copy link

darinda commented Sep 5, 2023

When placing an order a fatal error is thrown

Error:
Call to a member function getId() on null

  at vendor/wallee/shopware-6/src/Core/Api/Transaction/Service/TransactionService.php:313
  at WalleePayment\Core\Api\Transaction\Service\TransactionService->holdDelivery('018a659d017673f0a0b72e0673b48e80', object(Context))
     (vendor/wallee/shopware-6/src/Core/Api/Transaction/Service/TransactionService.php:172)
  at WalleePayment\Core\Api\Transaction\Service\TransactionService->create(object(AsyncPaymentTransactionStruct), object(SalesChannelContext))
     (vendor/wallee/shopware-6/src/Core/Checkout/PaymentHandler/WalleePaymentHandler.php:86)
  at WalleePayment\Core\Checkout\PaymentHandler\WalleePaymentHandler->pay(object(AsyncPaymentTransactionStruct), object(RequestDataBag), object(SalesChannelContext))
     (vendor/shopware/core/Checkout/Payment/Cart/PaymentTransactionChainProcessor.php:130)
  at Shopware\Core\Checkout\Payment\Cart\PaymentTransactionChainProcessor->process('018a659d017673f0a0b72e0673b48e80', object(RequestDataBag), object(SalesChannelContext), '/checkout/finish?orderId=018a659d017673f0a0b72e0673b48e80&changedPayment=1', '/account/order/edit/018a659d017673f0a0b72e0673b48e80')
     (vendor/shopware/core/Checkout/Payment/PaymentService.php:90)
  at Shopware\Core\Checkout\Payment\PaymentService->handlePaymentByOrder('018a659d017673f0a0b72e0673b48e80', object(RequestDataBag), object(SalesChannelContext), '/checkout/finish?orderId=018a659d017673f0a0b72e0673b48e80&changedPayment=1', '/account/order/edit/018a659d017673f0a0b72e0673b48e80')
     (vendor/shopware/core/Checkout/Payment/SalesChannel/HandlePaymentMethodRoute.php:46)
  at Shopware\Core\Checkout\Payment\SalesChannel\HandlePaymentMethodRoute->load(object(Request), object(SalesChannelContext))
     (vendor/shopware/storefront/Controller/AccountOrderController.php:281)
  at Shopware\Storefront\Controller\AccountOrderController->updateOrder('018a659d017673f0a0b72e0673b48e80', object(Request), object(SalesChannelContext))
     (vendor/symfony/http-kernel/HttpKernel.php:182)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:197)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true)
     (vendor/shopware/core/HttpKernel.php:143)
  at Shopware\Core\HttpKernel->doHandle(object(Request), 1, true)
     (vendor/shopware/core/HttpKernel.php:65)
  at Shopware\Core\HttpKernel->handle(object(Request))
     (public/index.php:85)                

This is caused by the plugin trying to hold the delivery of an order while - when placing an order - there most probably is none yet.

This leads to the error when trying to get the id of the latest delivery in an empty collection.

Checking for existance fixes the problem.

Used shopware version: v6.5.5.1
Used module version: 5.0.2

@Dominik-Niziol
Copy link

Dear Darina,

Thank you for your email.

We will gladly take a closer look at your problem.

In order for us to look at the problem, please provide us with the following data:
Shop Backend Login (full access recommended - Cache access necessary).

We kindly please you to send us your credentials through our ticketing system at [email protected]

Please make a complete backup before sending us the data.

We would like to point out that there may be short interruptions during interventions in the live system. We cannot accept any liability for such failures.
If you do not agree with this, please only send us access data to a test system provided by you and mention this explicitly.

Sincerely,
Dominik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants