Adyen / adyen-shopware6

Adyen Payment plugin for Shopware 6
MIT License
21 stars 22 forks source link

Webhook - Klarna (Invoice) Authorisation with manual capture partly fails if no originalPspReference exists #564

Open AndreasA opened 1 month ago

AndreasA commented 1 month ago

Describe the bug In some rare cases, it is possible that the payment has been authorised in Klarna, but the redirect to the Shop fails or browser was closed prematurely.

This results in the payment not setting the original psp reference in that redirect.

Now the authorisation webhook is received, which is fine and the payment state is changed to authorised. However, the check regarding manual capture necessary etc. requires the original psp refernece which is missing.

Therefore, after changing the state to authorised nearly everything else fails and also no capture is possible. The order will not even show the received/processed webhook in the admin. I guess the notification should include some reference? or can this be done without the psp reference somehow?

It should also be possible to capture the payment in such a scenario.

Versions Shopware version: 6.5.8.14 Plugin version: 3.15.0