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

Random paypal/creditcard orders stuck in status "processing" #541

Open
hannes011 opened this issue Apr 11, 2024 · 2 comments
Open

Random paypal/creditcard orders stuck in status "processing" #541

hannes011 opened this issue Apr 11, 2024 · 2 comments

Comments

@hannes011
Copy link

hannes011 commented Apr 11, 2024

Hi,

I've recently updated Magento (2.4.5-p1 -> 2.4.6-p3) and the PayONE module (3.7.0 -> 3.9.0).
I've observed a couple of orders which are marked paid and shipped which do not move forward to status "complete".
I've compared the data but couldn't find any reason why most orders are processed correctly but few are not. I checked all log files but couldn't find any hint for that exceptional behavior.
Since they have already all items invoiced and shipped I cannot change the status via the admin panel (the buttons are not displayed).

All affected orders have in common:

  • sales_order.base_total_due is positive
  • sales_order.base_total_paid is NULL (also visible in the total of the order admin view)
  • sales_invoice.base_grand_total exists and is equal the sales_order.base_grand_total

Strange is that sales_order_payment.base_amount_paid is sometimes NULL and sometimes set.

All these orders are actually paid and also the invoice record in Magento admin panel is saying "paid".

Is there anyone else facing similar problems?

The affected orders:

SELECT o.entity_id, o.increment_id, o.state, o.status, o.store_id, o.created_at, o.base_grand_total, o.base_total_due, p.method, p.base_amount_paid, o.total_paid, i.base_grand_total 'invoiced_total' FROM sales_order o LEFT JOIN sales_order_payment p ON p.parent_id=o.entity_id LEFT JOIN sales_invoice i ON i.order_id=o.entity_id LEFT JOIN sales_shipment s ON o.entity_id=s.order_id WHERE o.base_total_due > 0 AND o.status = 'processing' AND o.base_total_paid IS NULL AND i.entity_id IS NOT NULL AND s.entity_id IS NOT NULL ORDER BY o.entity_id;
+-----------+-----------------+------------+------------+----------+---------------------+------------------+----------------+-------------------+------------------+------------+----------------+
| entity_id | increment_id    | state      | status     | store_id | created_at          | base_grand_total | base_total_due | method            | base_amount_paid | total_paid | invoiced_total |
+-----------+-----------------+------------+------------+----------+---------------------+------------------+----------------+-------------------+------------------+------------+----------------+
|     67466 | xxxxxxxxxxxxx   | processing | processing |        1 | 2024-04-05 07:49:09 |         474.1000 |       474.1000 | payone_paypal     |             NULL |       NULL |       474.1000 |
|     65537 | xxxxxxxxxxxxx   | processing | processing |        1 | 2024-03-29 10:29:08 |         399.2000 |       399.2000 | payone_creditcard |         399.2000 |       NULL |       399.2000 |
|     64934 | xxxxxxxxxxxxx   | processing | processing |        1 | 2024-03-26 17:19:24 |         399.2000 |       399.2000 | payone_paypal     |         399.2000 |       NULL |       399.2000 |
|     62804 | xxxxxxxxxxxxx   | processing | processing |        1 | 2024-03-20 07:58:30 |         495.2000 |       495.2000 | payone_paypal     |         495.2000 |       NULL |       495.2000 |
|     62300 | xxxxxxxxxxxxx   | processing | processing |        1 | 2024-03-18 12:39:18 |         143.2000 |       143.2000 | payone_paypal     |         143.2000 |       NULL |       143.2000 |
|     61274 | xxxxxxxxxxxxx   | processing | processing |        5 | 2024-03-13 20:29:30 |          49.9000 |        49.9000 | payone_paypal     |             NULL |       NULL |        49.9000 |
+-----------+-----------------+------------+------------+----------+---------------------+------------------+----------------+-------------------+------------------+------------+----------------+
@dmf-janw
Copy link

I can confirm that I see the same issue. In my case however, we use Magento 2.4.5-p8 and version 3.8.1 of the PayONE module.

The only difference is that sales_order.base_total_paid is actually set to the expected value (i.e. the total price as the order has been fully paid).

@janteuber
Copy link
Contributor

The problem doesn't tell us anything at first and we can't think of anything in the module that could be responsible for it.

Since the behavior was associated with a module update, we looked at all the adjustments to the module in the versions mentioned.
However, nothing jumped out at us that could be responsible for this behavior, and we didn't actually do anything with the order status.

In general, it is also the Magento core code that sets an order to complete - the Payone module has nothing to do with this directly.

In particular, you say that this only occurs rarely and not always, so it is virtually impossible to make a remote diagnosis.

Translated with DeepL.com (free version)

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