ACSD-49737: Coupon is incorrectly marked as used after a failed card payment

The ACSD-49737 patch fixes the issue where the coupon is incorrectly marked as used after a failed card payment. This patch is available when the Quality Patches Tool (QPT) 1.1.30 is installed. The patch ID is ACSD-49737. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.4

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.1-p1 - 2.4.6
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe 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

The coupon is incorrectly marked as used after a failed card payment.

Prerequisites:

  1. Configure the Braintree sandbox payment method.
  2. Make sure the sales.rule.update.coupon.usage consumer is set up and running.

Steps to reproduce:

  1. Create a Cart Price Rule with auto generated coupon codes.
  2. Log in as a customer.
  3. Add product(s) to the cart.
  4. Apply an auto generated coupon code.
  5. Try to place an order with a failed payment.
  6. Check the coupon usage in the Cart Price Rule under the Manage Coupon Codes tab.

Expected results:

Coupon shouldn’t be flagged as used if the payment is failed.

Actual results:

  • Coupon code says - Used: Yes, Times Used: 1
  • Coupon code is valid for a single-time use only.

Apply the patch

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

Additional steps required after the patch installation

(This section is optional; there might be some steps required after applying the patch to fix the issue.)

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a