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

Inconsistent notification behavior on multiple identical webhook confirmations #6

Open
lphilippo opened this issue Mar 4, 2021 · 1 comment
Assignees

Comments

@lphilippo
Copy link
Contributor

For processing confirmed Authorizations there is a check that prevents double processing, with the following code:

        // accept only authorizations for new (pending) orders
        if ($order->getStatus() !== $order->getConfig()->getStateDefaultStatus($order::STATE_NEW)) {
            $this->_addOrderMessage(
                $order,
                __('ingenico.notification.message2', $authorizedStatus, $order->getStatus())
            );

            return $this->orderRepository->save($order);
        }

A similar check is not present in processing processOrderPayment, probably as it would require finding the appropriate initial status (i.e. what CleanExpiredOrders uses). Similar behaviour is achieved though, by the existing invoices check (and the $processStatus check).

Unfortunately, since we miss a similar notification when this happens during capturing instead of authorisation, would you be open to a similar acceptable check at the start of processOrderPayment?

@olegisk olegisk self-assigned this Jun 25, 2021
@olegisk
Copy link
Collaborator

olegisk commented Jun 25, 2021

I think the most important check if an invoice is exists in the method processOrderPayment. There's status doesn't matter because possible to configure the same statuses for authorized and sale transactions.

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

No branches or pull requests

2 participants