BitBagCommerce/SyliusAdyenPlugin

PaymentCheckoutOrderResolver create new order

Closed this issue · 9 comments

Hello, i am using this plugin for my sylius shop.

Sometimes, when the paiement has been completed, in src/Resolver/Order/PaymentCheckoutOrderResolver.php:resolve() the token is not recognized and i think a new $order is created with :

if (!$order instanceof OrderInterface) {
            $order = $this->cartContext->getCart();
}

Finally, i have the following error :
request.CRITICAL: Uncaught PHP Exception Symfony\Component\Messenger\Exception\HandlerFailedException: "Handling "BitBag\SyliusAdyenPlugin\Bus\Command\TakeOverPayment" failed: Order #574 has no Payment associated" at /app/vendor/symfony/doctrine-bridge/Messenger/DoctrineTransactionMiddleware.php line 42 {"exception":"[object] (Symfony\\Component\\Messenger\\Exception\\HandlerFailedException(code: 0): Handling \"BitBag\\SyliusAdyenPlugin\\Bus\\Command\\TakeOverPayment\" failed: Order #574 has no Payment associated at /app/vendor/symfony/doctrine-bridge/Messenger/DoctrineTransactionMiddleware.php:42)\n[previous exception] [object] (InvalidArgumentException(code: 0): Order #574 has no Payment associated at /app/vendor/bitbag/sylius-adyen-plugin/src/Traits/PayableOrderPaymentTrait.php:27)"} []

In fact, my order with the token is 573 (in my database).

Can you help me please ?

Hello @pbalcerzak can you help me please ?

Hi @mmarousez-dc! We are working on that, could you give us some pointers (which payment method) or any additional information that would help us reproduce the issue?

Hello @pbalcerzak, Thanks for reply.

It seems random and can arrive with the live platform or with the test platform.
It can be with Visa or Mastecard.
I can precise than i retrieve the good "Merchant Reference" in adyen for my order.
It concern 10% of my orders but when i compare with my others orders i can't see anything who can explain that.

If you need more, just ask.

Thanks.

Thanks!
Unfortunately it didn't help us with reproducing this issue.
Could you provide us with your PHP and plugin version?

Also maybe you have any other plugin that might influence how orders work in Sylius?

We are on php 8.0.25 and plugin 1.2.4

I've setup a clean sylius project with the plugin installed and created 30 orders with different payment methods. Didn't have any issues.

Could you try to reproduce it on clean sylius install?

I finally find how reproduce. It's when i double click on submit button on my sylius shop in the payment form.

solved with

.loading{
pointer-events: none;
}

Hello @mmarousez-dc, i was unable to reproduce issue you have described. I assume it was already fixed? Due to that i am closing. However feel free to reopen in case of recurrence.