magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

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

Closed m2-assistant[bot] closed 5 months ago

m2-assistant[bot] commented 4 years ago

This issue is automatically created based on existing pull request: magento/magento2#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 (*)

andreustimm commented 3 years ago

Almost a year, in Magento 3.0 they will fix :(

m2-assistant[bot] commented 5 months ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 5 months ago

Hello @andreustimm,

Thank you for the report and collaboration!

Can you please elaborate the description, where is this causing the issue and please mention the steps to reproduce, and also the use case for the same.

engcom-November commented 5 months ago

Hello @andreustimm,

As there is no activity on this issue for a long time, we believe the issue has been resolved, hence closing this issue. Feel free to raise a new issue or reopen this if you need more assistance.

Thank you.