Skip to content

[Issue] Bugfix - Payment Method without label position in the array #30922

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #30907: Bugfix - Payment Method without label position in the array


Description (*)

Look at position 14 the Payment Provider may forget the label and this can break the store.

Then, to avoid this bug I put a verification.

Array
(
    [0] => Array
        (
            [value] => 
            [label] => 
        )

    [1] => Array
        (
            [value] => vault
            [label] => 
        )

    [2] => Array
        (
            [value] => mercadopago
            [label] => 
        )

    [3] => Array
        (
            [value] => substitution
            [label] => 
        )

    [4] => Array
        (
            [value] => amazon_payment
            [label] => Amazon Pay
        )

    [5] => Array
        (
            [value] => amazonlogin
            [label] => Amazon Pay
        )

    [6] => Array
        (
            [value] => mercadopago_custom_bank_transfer
            [label] => Bank Transfer - Mercado Pago
        )

    [7] => Array
        (
            [value] => Array
                (
                    [braintree_ach_direct_debit] => Array
                        (
                            [value] => braintree_ach_direct_debit
                            [label] => ACH Direct Debit
                        )

                    [braintree_applepay] => Array
                        (
                            [value] => braintree_applepay
                            [label] => Apple Pay
                        )

                    [braintree] => Array
                        (
                            [value] => braintree
                            [label] => Credit Card
                        )

                    [braintree_googlepay] => Array
                        (
                            [value] => braintree_googlepay
                            [label] => Google Pay
                        )

                    [braintree_local_payment] => Array
                        (
                            [value] => braintree_local_payment
                            [label] => Local Payments
                        )

                    [braintree_paypal] => Array
                        (
                            [value] => braintree_paypal
                            [label] => PayPal
                        )

                    [braintree_paypal_credit] => Array
                        (
                            [value] => braintree_paypal_credit
                            [label] => PayPal Credit
                        )

                    [braintree_paypal_vault] => Array
                        (
                            [value] => braintree_paypal_vault
                            [label] => Stored Accounts (PayPal)
                        )

                    [braintree_cc_vault] => Array
                        (
                            [value] => braintree_cc_vault
                            [label] => Stored Cards
                        )

                    [braintree_venmo] => Array
                        (
                            [value] => braintree_venmo
                            [label] => Venmo
                        )

                )

            [label] => Braintree
        )

    [8] => Array
        (
            [value] => mercadopago_custom
            [label] => Credit Card - Mercado Pago
        )

    [9] => Array
        (
            [label] => Klarna
            [value] => Array
                (
                    [klarna_kp] => Array
                        (
                            [value] => klarna_kp
                            [label] => Klarna Payments
                        )

                )

        )

    [10] => Array
        (
            [value] => Array
                (
                    [banktransfer] => Array
                        (
                            [value] => banktransfer
                            [label] => Bank Transfer Payment
                        )

                    [cashondelivery] => Array
                        (
                            [value] => cashondelivery
                            [label] => Cash On Delivery
                        )

                    [checkmo] => Array
                        (
                            [value] => checkmo
                            [label] => Check / Money order
                        )

                    [free] => Array
                        (
                            [value] => free
                            [label] => No Payment Information Required
                        )

                    [purchaseorder] => Array
                        (
                            [value] => purchaseorder
                            [label] => Purchase Order
                        )

                )

            [label] => Offline Payment Methods
        )

    [11] => Array
        (
            [value] => Array
                (
                    [payflow_advanced] => Array
                        (
                            [value] => payflow_advanced
                            [label] => Credit Card (Payflow Advanced)
                        )

                    [payflow_link] => Array
                        (
                            [value] => payflow_link
                            [label] => Credit Card (Payflow Link)
                        )

                    [payflowpro] => Array
                        (
                            [value] => payflowpro
                            [label] => Credit Card (Payflow Pro)
                        )

                    [paypal_billing_agreement] => Array
                        (
                            [value] => paypal_billing_agreement
                            [label] => PayPal Billing Agreement
                        )

                    [payflow_express_bml] => Array
                        (
                            [value] => payflow_express_bml
                            [label] => PayPal Credit (Payflow Express Bml)
                        )

                    [paypal_express_bml] => Array
                        (
                            [value] => paypal_express_bml
                            [label] => PayPal Credit (Paypal Express Bml)
                        )

                    [paypal_express] => Array
                        (
                            [value] => paypal_express
                            [label] => PayPal Express Checkout
                        )

                    [payflow_express] => Array
                        (
                            [value] => payflow_express
                            [label] => PayPal Express Checkout Payflow Edition
                        )

                    [hosted_pro] => Array
                        (
                            [value] => hosted_pro
                            [label] => Payment by cards or by PayPal account
                        )

                    [payflowpro_cc_vault] => Array
                        (
                            [value] => payflowpro_cc_vault
                            [label] => Stored Cards (Payflow Pro)
                        )
                )
            [label] => PayPal
        )

    [12] => Array
        (
            [value] => mercadopago_basic
            [label] => Quiero pagar con Mercado Pago sin costo Adicional.
        )

    [13] => Array
        (
            [value] => mercadopago_customticket
            [label] => Ticket - Mercado Pago
        )

    [14] => Array
        (
            [value] => Array
                (
                    [pagseguro] => Array
                        (
                            [value] => pagseguro
                            [label] => PagSeguro
                        )
                )
        )
)

Related Pull Requests

No

Manual testing scenarios (*)

Anyone who sends a multiple arrays without a label will break the store, especially in the admin.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Labels

Component: BackendIssue: needs updateAdditional information is require, waiting for responsePriority: P3May be fixed according to the position in the backlog.Progress: doneSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions