Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4498 by bill
14 Aug 2017, 18:31
Hi

I have ai-payment installed in my ext , my question :
is there away to add a function in : ext/ai-payments/lib/custom/src/MShop/Service/Provider/Payment/OmniPay.php without changing the ai-payments core?

please let me know

Thanks
#4501 by aimeos
15 Aug 2017, 08:49
Yes, extend form the OmniPay class and give your class a new name. Save it in your own extension in the same directory structure. Use the name of your own class in the service tab instead of "OmniPay".
#4502 by bill
15 Aug 2017, 15:26
Hi

You mean the service tab in the admin? I used AuthorizeAIM not Omnipay , but from what I foudn out that Omnipay is the one used for ALL ai-payment payments gateways

So I need to create a new class lets say I call it "NewOmniPay.php" and save it here :
ext/My-EXT/lib/custom/src/MShop/Service/Provider/Payment/NewOmniPay.php

is that Correct?

Do I need to add this path to the shop.php config?
#4506 by aimeos
15 Aug 2017, 20:29
If you use AuthorizeAIM, you should extend from this class and name it NewAuthorizeAIM or alike.
What changes do you want to make? Are they interesting for others too?

No, you don't need more configuration because the path "lib/custom/src" is already in the manifest.php of your project specific extension and you use it by configuring "NewAuthorizeAIM" instead of "OmniPay".