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

wallee_transactions.state is regularly out of sync #2

Open
nxso opened this issue Jul 26, 2024 · 6 comments
Open

wallee_transactions.state is regularly out of sync #2

nxso opened this issue Jul 26, 2024 · 6 comments

Comments

@nxso
Copy link

nxso commented Jul 26, 2024

Hi there,
We use wallee-payment/[email protected] in two shops and about every 2nd day we have at least one transaction where the wallee_transactions.state is not synchronised with the transaction, although app-wallee.com's webhook log is claiming that all webhooks were executed successfully and received a HTTP/200.

Manually re-triggering the webhook usually updates the state successfully. If this happened once a month, I wouldn't mind, but every other day seems a bit much to us.

Not sure what causes the issue, since the webhook endpoint seems to work in general. Not having spent a lot of time analyzing your code:

  • Does wallee-payment/jtl-5 returns the webhook before it confirms that wallee_transactions.state has been successfully updated to the new state?
  • Does app-wallee.com just validate its HTTP/200 status or also its response body? (e.g. potential issues with unintended redirects by other plugins, htaccess etc.)

Any ideas?

Happy to provide further information.

@RelvisRamone
Copy link

Hello, were you able to find a solution to this issue?

@nxso
Copy link
Author

nxso commented Aug 22, 2024

No, we raised a support ticket on Aug 6 ([email protected]) since no one seems to feel responsible for the issues raised here.

We found the following two reasons:

  1. Wallee does not check if the transaction was found and updated. Therefore the webhook always returns a 200 response - even when the transaction update did fail.

    public function updateTransactionStatus($transactionId, $newStatus)
    {
    Shop::Container()
    ->getDB()->update(
    'wallee_transactions',
    ['transaction_id'],
    [$transactionId],
    (object)['state' => $newStatus]
    );
    }

  2. The order is only stored in the user's session, not in the db. If for whatever reason a transaction takes too long and the user looses patience at some point, the session might get lost. Since wallee does not store the order on their own, those orders will be completely lost and have to be manually recreated based on the infos stored in app-wallee.com.

    if ($orderId === 0) {

@RelvisRamone
Copy link

I am in contact with 3 business partners, and we all have the daily problem of having to create orders manually. This means daily manual checking of all orders and transactions. Most of them use the Postfinance plugin. But it's technically the same.

I hope there will be an improvement in the near future; otherwise we will look for another solution.

@nxso
Copy link
Author

nxso commented Sep 18, 2024

Yeah, not sure how wallee weights «business impact» in their prioritisation of reported issues. We're currently evaluating writing our own payment plugin which would allow us to switch back to Datatrans. Their backend is old school, but works. Let me know if you're interested.

@mkis84
Copy link

mkis84 commented Sep 19, 2024

We still use datatrans at our live shop and it works perfectly. Even with the option "payment before order creation". It works absolutely great. Unfortunately, the plugin is no longer being developed, which we find extremely unfortunate.

@nxso
Copy link
Author

nxso commented Sep 19, 2024

Yes, we very likely used the same plugin but had to update due to bugfixes and security updates we urgently needed.

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

3 participants