Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.12.17 cannot create refund #78

Open
f123248 opened this issue Nov 16, 2023 · 0 comments
Open

v1.12.17 cannot create refund #78

f123248 opened this issue Nov 16, 2023 · 0 comments

Comments

@f123248
Copy link

f123248 commented Nov 16, 2023

Hi, we found this error when we doing the refund in magento 2.4.5p4
The function is on null.
image

After that, we was looking into the function at vendor/riskified/magento2new/Model/Observer/ProcessSuccessfulPost.php

Please check the code in 1.12.17
image

We made the modify as below code snippet.
And then, it worked

    /**
     * ProcessSuccessfulPost constructor.
     * @param OrderLogger $logger
     * @param OrderApi $orderApi
     */
    public function __construct(
        OrderLogger $logger,
        OrderApi $orderApi,
        Registry $registry
    ) {
        $this->logger = $logger;
        $this->orderApi = $orderApi;
        $this->registry = $registry;
    }

The $this->registry should added after $this->orderApi = $orderApi;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant