Skip to content

[GraphQl 2.4.2] All active payment methods are returned for "free" orders #34036

Closed
@Hexmage

Description

@Hexmage

Preconditions (*)

  1. Magento 2.4.2
  2. Enable zero subtotal checkout
  3. Enable Check / Money order

Steps to reproduce (*)

  1. Create a product with price 0
  2. Add free product to cart
  3. Set a shipping and billing address
  4. Set freeshipping_freeshipping shipping method.
  5. Run graphql query:
query getCartDetails($cartId: String!) {
	cart(cart_id: $cartId) {
	    available_payment_methods {
                code
                title
            }
    }
}

Expected result (*)

{
    "data": {
        "getCartDetails": {
            "cart": {
                "available_payment_methods": [
                    {
                        "code": "free",
                        "title": "No Payment Information Required"
                    }
                ],
            }
        }
    }
}

Actual result (*)

{
    "data": {
        "getCartDetails": {
            "cart": {
                "available_payment_methods": [
                    {
                        "code": "free",
                        "title": "No Payment Information Required"
                    },
                   {
                        "code": "checkmo",
                        "title": "Check / Money order"
                    },
                ]
            }
        }
    }
}

The Issue

If the order is free most other payment methods will break when trying to place the order. In the normal magento frontend this is handle by hiding all the other payment methods with javascript. Imo the other payment methods shouldn't be returned in the first place if they aren't going to work.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Labels

Area: PaymentsComponent: GraphQLGraphQLComponent: PaymentIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions