btcpayserver / woocommerce-plugin

Plugin for connecting Woocommerce with BTCPayServer
https://btcpayserver.org/
Other
51 stars 41 forks source link

Issue with order statuses #29

Closed vraisa-coinmotion closed 5 years ago

vraisa-coinmotion commented 5 years ago

"BTCPay invoice confirmed. Awaiting payment completed status." After that, the order has been processed and marked as complete.

"BTCPay invoice payment completed. Payment credited to your merchant account."

The order goes from Complete to Processing status again. This is a serious issue. It should be checked if the status is already complete and if so, do not change it to back to a processing status.

NicolasDorier commented 5 years ago

@ihqtzup can you share your BTCPay plugin settings?

vraisa-coinmotion commented 5 years ago
Näyttökuva 2019-7-18 kello 17 07 00
NicolasDorier commented 5 years ago

@ihqtzup as you can read, your settings specifically says: If the invoice is confirmed or completed, set the status to processing. Just set it up the way you want.

vraisa-coinmotion commented 5 years ago

No, it does not solve the problem as you might first think of it. All orders should be in the processing-status until they are processed and shipped. If I put in the settings Complete: Complete instead of Complete: Processing, then the order goes to complete status immediately after the BTCPay invoice is complete. So, for example, all orders made during the weekend would be marked as complete, and they will never get processed and shipped actually.

vraisa-coinmotion commented 5 years ago

"they will never get processed and shipped actually." well this is just for example that you understand what I mean. We have procedures and checks that this can not actually happen, but this is still an issue. You should definitely always check the current order status before updating it. It does not make sense to update complete order back to processing automatically. That would be very easy to fix in the code.

NicolasDorier commented 5 years ago

So if I understand your issue:

  1. Order come
  2. Customer pays => On Hold
  3. Confirmed => Order go to processing
  4. You manually put the order to "complete"
  5. Completed => Order go back to processing

You are telling me that completed should not put back to processing?

If that's the case, just put the "Complete" state to "blank" so that woocommerce ignore it.

vraisa-coinmotion commented 5 years ago

Ahh, I see. I will try that out! Thank you very much!

NicolasDorier commented 5 years ago

please close this issue if it solves your issue.