MultiSafepay / magento2

MultiSafepay plugin for Magento 2
Open Software License 3.0
19 stars 8 forks source link

Msp orders get stuck on pending if offline captured #64

Closed Hexmage closed 2 months ago

Hexmage commented 3 months ago

Describe the bug When an order, with a multisafepay payment method is pending payment, is captured offline the status is changed to pending instead of processing. Orders which have an invoice should get the status processing not pending.

To Reproduce Steps to reproduce the behavior:

  1. Go through the normal checkout process.
  2. When you are redirected to the MSP payment page, instead of completing the payment fire an invoice rest api call.
    POST to {base_url}/rest/all/V1/order/{order_id}/invoice
    {
    "capture": false, //captured offline if false
    "notify": true,
    "appendComment": true,
    "comment": {
        "comment": "auto-invoiced by api",
        "is_visible_on_front": 0
    }
    }

Expected behavior An invoice is created and the order is set to processing.

Actual behavior An invoice is created and the order is set to pending.

Specs Magento 2.4.6-p4 MSP 3.3.0 (but the code responsible for this is still there in the lastest version see https://github.com/MultiSafepay/magento2-core/blob/master/Observer/InvoiceSaveAfterObserver.php#L102)

vinodsowdagar commented 3 months ago

Hi @Hexmage ,

Thank you for the report. We'll investigate this and come back to you later.

vinodsowdagar commented 3 months ago

Hi @Hexmage ,

We've confirmed this issue and we are going to work on a fix in the upcoming sprint. We'll keep you updated about the release.

Hexmage commented 3 months ago

@vinodsowdagar Thanks!

vinodsowdagar commented 2 months ago

Hi @Hexmage ,

The issue should be fixed in the latest version: https://github.com/MultiSafepay/magento2/releases/tag/3.5.1 I'm closing this issue for now. If there are any related questions, feel free to add a comment.