Payment Proccessor My_Changes Override

Hello

I want to know if is possible to override the payment proccessor php file.

The file is located in root/app/payments/proccessor.php

What folder structure do I have to create so this file will be overridden ? It is a core file and I don't want to change it

thank you

Hello

I want to know if is possible to override the payment proccessor php file.

The file is located in root/app/payments/proccessor.php

What folder structure do I have to create so this file will be overridden ? It is a core file and I don't want to change it

thank you

Unfortunately, you cannot override it. But you can change script path during addon installation and return it back during uninstallation

Can you please explain how I can do this ?

For example, you can add the following code to the addon.xml file

    
        fn_my_addon_install
        fn_my_addon_uninstall
    

Then just create corresponding functions in the func.php file where corresponding requests to database can be done

Alternative way - to specify SQL requests in the addon.xml file directly

    
        UPDATE ?:payment_processors SET processor_script = 'aaa.php' WHERE processor_script = 'bbb.php';
        UPDATE ?:payment_processors SET processor_script = 'bbb.php' WHERE processor_script = 'aaa.php';
    

Thanks a lot eComLabs,

That was the best solution I guess. I created a simple addon with your queries inside

UPDATE ?:payment_processors SET processor_script = 'aaa.php' WHERE processor_script = 'bbb.php';
UPDATE ?:payment_processors SET processor_script = 'bbb.php' WHERE processor_script = 'aaa.php';

But I noticed a strange thing. I clicked the install button from addons area, the script has successfully changed inside database, but the addon is not marked as installed.

Have you got any clue ?

Thanks a lot eComLabs,

That was the best solution I guess. I created a simple addon with your queries inside

UPDATE ?:payment_processors SET processor_script = 'aaa.php' WHERE processor_script = 'bbb.php';
UPDATE ?:payment_processors SET processor_script = 'bbb.php' WHERE processor_script = 'aaa.php';

But I noticed a strange thing. I clicked the install button from addons area, the script has successfully changed inside database, but the addon is not marked as installed.

Have you got any clue ?

Does it work correctly if you remove these additional lines of code?

Make sure that the addon directory name matches the id tag in addon.xml

Thank you,

It was just the issue

You are welcome!