razorpay / razorpay-magento

Razorpay Payment Extension for Magento
28 stars 38 forks source link

All Razorpay setting in Website view settle as default #428

Closed f123248 closed 5 months ago

f123248 commented 1 year ago

It got the below error when you click save directly.

In my opinion, $razorpayParams wasn't initial if (empty($firstElement) === false and array_keys($firstElement)[0] === "value") condition didn't pass.

Something went wrong while saving this configuration: Warning: Undefined variable $razorpayParamsFormattedArray in /app/mccwww/vendor/razorpay/magento/Observer/AfterConfigSaveObserver.php on line 208 image

default variable of $razorpayParams

2023-04-14T01:58:47+00:00 INFO (6): save
2023-04-14T01:58:47+00:00 INFO (6): Array
(
    [title] => Array
        (
            [value] => Razorpay
        )

    [merchant_name_override] => Array
        (
            [value] => Magento
        )

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

    [rzp_payment_action] => Array
        (
            [value] => authorize
        )

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

    [key_id] => Array
        (
            [value] => Key ID
        )

    [key_secret] => Array
        (
            [value] => Key Secret
        )

    [enable_pending_orders_cron] => Array
        (
            [value] => 1
        )

    [pending_orders_timeout] => Array
        (
            [value] => 30
        )

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

    [order_status] => Array
        (
            [value] => pending
        )

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

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

    [specificcountry] => Array
        (
            [value] => 
        )

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

    [sort_order] => Array
        (
            [value] => 
        )

)

Website view variable that settle all default

2023-04-14T02:00:19+00:00 INFO (6): save
2023-04-14T02:00:19+00:00 INFO (6): Array
(
    [title] => Array
        (
            [inherit] => 1
        )

    [merchant_name_override] => Array
        (
            [inherit] => 1
        )

    [active] => Array
        (
            [inherit] => 1
        )

    [rzp_payment_action] => Array
        (
            [inherit] => 1
        )

    [auto_invoice] => Array
        (
            [inherit] => 1
        )

    [key_id] => Array
        (
            [inherit] => 1
        )

    [key_secret] => Array
        (
            [inherit] => 1
        )

    [order_status] => Array
        (
            [inherit] => 1
        )

    [enable_custom_paid_order_status] => Array
        (
            [inherit] => 1
        )

    [allowspecific] => Array
        (
            [inherit] => 1
        )

    [specificcountry] => Array
        (
            [value] => 
            [inherit] => 1
        )

    [disable_upgrade_notice] => Array
        (
            [inherit] => 1
        )

    [sort_order] => Array
        (
            [inherit] => 1
        )

)
yashgit891 commented 5 months ago

@f123248 please check with latest version, if issue still persists please reopen the thread.

madparcival commented 2 weeks ago

Is this issue solved. I am also getting this error.