ÃÛ¶¹ÊÓÆµ

[PaaS only]{class="badge informative" title="Applies to ÃÛ¶¹ÊÓÆµ Commerce on Cloud projects (ÃÛ¶¹ÊÓÆµ-managed PaaS infrastructure) and on-premises projects only."}

ACSD-65938: Gift card emails sent even when the invoice creation failed

The ACSD-65938 patch resolves an issue where gift card emails were sent before the invoice was successfully saved and committed. With this fix, emails are now triggered only after the invoice has been successfully saved. This patch is available when the Quality Patches Tool (QPT) 1.1.68 is installed. The patch ID is ACSD-65938. Please note that this issue is scheduled to be fixed in ÃÛ¶¹ÊÓÆµ Commerce 2.4.9.

Affected products and versions

The patch is created for ÃÛ¶¹ÊÓÆµ Commerce version:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.7

Compatible with ÃÛ¶¹ÊÓÆµ Commerce versions:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.4 - 2.4.8-p1
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your ÃÛ¶¹ÊÓÆµ Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Gift card emails were sent before confirming that the invoice was successfully created and saved, resulting in emails being sent even when invoice creation failed.

Steps to reproduce:

  1. Log in to the Admin panel.

  2. Navigate to Stores > Settings > Configuration > Sales > Gift Cards > Gift Card General Settings, and set Generate Gift Card Account when Order Item is to Invoiced.

  3. Create a new gift card product.

  4. Add gift cart product to cart and proceed to checkout. You can use Check/Money Order as the payment method.

  5. Place the order.

  6. Modify the OrderRepository to simulate an exception during order placement.

  7. Send a POST request to rest/default/V1/order/<ORDER_ID>/invoice with the following payload:

    code language-none
    {
      "capture": true,
      "notify": true
    }
    

Expected results:

No gift card email should be sent if the invoice creation fails.

Actual results:

Gift card email is sent even though the invoice creation has failed.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3