Overiding or extending Omnipay

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
bill
Posts: 51
Joined: 24 Apr 2017, 17:51

Overiding or extending Omnipay

Post 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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Overiding or extending Omnipay

Post 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".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

bill
Posts: 51
Joined: 24 Apr 2017, 17:51

Re: Overiding or extending Omnipay

Post 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?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Overiding or extending Omnipay

Post 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".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply