The MDVA-31150 Magento patch fixes the issue where an invoice is created without store credit information. This patch is available when the Magento Quality Patch (MQP) tool v.1.0.8 is installed. Please note that the issue will be fixed in Magento version 2.4.2.
Affected products and versions
- This patch was designed for Magento Commerce Cloud 2.3.5-p2.
- The patch is also compatible with Magento Commerce and Magento Commerce Cloud 2.3.0 to 2.3.5-p2, and 2.4.0 to 2.4.0-p1.
Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run ./vendor/bin/magento-patches status
.
Issue
After the invoice order by API the used customer balance and gift card information is not present in the invoice.
Steps to reproduce
- Add a store credit amount to a customer account: On the Admin sidebar, go to Customers > All Customers.
- Find the customer record and click on Edit in the Action column, then Store Credit > Update the balance > Save Customer.
- Go to Storefront and add products to cart.
- Place an order by applying the store credit or gift card amount as partial payment.
- Create invoice using
REST API>POST>/rest/V1/order/1/invoice
with payload:{ "capture": true, "items": [ { "extension_attributes": {}, "order_item_id": 3, "qty": 1 } ], "notify": true, "appendComment": true, "comment": { "extension_attributes": {}, "comment": "string", "is_visible_on_front": 0 }, "arguments": { "extension_attributes": {} }}
- Get the invoice that was just created using
REST API>GET>/rest/V1/invoices/1
.
Expected result
Store credit and gift card balance are returned by API Call.
Actual result
Store credit and gift card balance are not returned by API Call.
Apply the patch
For instructions on how to apply an MQP patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
Related reading
To learn more about Magento Quality Patches, refer to:
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.