mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
101 stars 52 forks source link

Virtual order automatically set to complete #583

Closed hansvereyken closed 1 year ago

hansvereyken commented 1 year ago

Describe the bug When placing a virtual order (none of the items requires shipment (eg: virtual gift cards)), the order status is set to complete instead of the status configured in Stores -> Settings -> Configuration -> Mollie -> Advanced -> Statuses -> Status Processing

Used versions

To Reproduce Steps to reproduce the behavior:

  1. Place an order only containing virtual products
  2. Go through the checkout, pay for the order
  3. Go to the admin, check the newly created order status

Expected behavior The status is set to the status configured in Stores -> Settings -> Configuration -> Mollie -> Advanced -> Statuses -> Status Processing

Actual behavior The order is set to 'complete'

Additional context This probably is Magento's doing, since no shipping is required, it will set it to complete automatically. But this is a problem for our bookkeeping integration.

hansvereyken commented 1 year ago

https://github.com/magento/magento2/issues/3922 https://magento.stackexchange.com/questions/153388/how-to-define-the-order-status-after-placing-it-for-a-virtual-product-in-magento

Marvin-Magmodules commented 1 year ago

Hi @hansvereyken, this is intended behavior as these orders do not require a shipment and thus do not touch the processing state. A processing state holds orders that have an invoice and still require a (full)shipment. So setting a processing status does not apply to these orders.

hansvereyken commented 1 year ago

Yes, that's what I expected. As mentioned, this is a problem for our bookkeeping integration, it will only process 'processing' orders. The virtual orders never reach this state. According to Magento's documentation, it's the payment module setting the after-payment-order-status, apparently this excludes virtual orders (not documented as far as I can see).

Marvin-Magmodules commented 1 year ago

Hi @hansvereyken, yes indeed. We are closing this issue now as this behavior is as intended and also not an issue that is related to the Mollie module.