How to add additional charges in PayPal?

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!
Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: How to add additional charges in PayPal?

Post by Harpal Singh » 10 Jun 2019, 11:34

aimeos wrote:The field is unknown to the rest of the Aimeos code so this won't work if you don't adapt all code that should use the value from this field.

An easier solution would be to write a service provider decorator that adds the setup costs to the basket during checkout in either the delivery or payment selection step (if it's the only delivery option, the costs will be added immediately when adding a product by the Autofill basket plugin). You can add the costs not only as shipping or payment costs but also as delivery/payment related "product" line if you add the setup costs as delivery/payment price value instead of price costs.
Can you please give some idea about How to write a service provider decorator and how to use it with payment gateway?
Thanks
Harpal Singh

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

Re: How to add additional charges in PayPal?

Post by aimeos » 10 Jun 2019, 16:10

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: How to add additional charges in PayPal?

Post by Harpal Singh » 12 Jun 2019, 10:06

Can I use Costs decorator outside from vendors in my extension folder of project.
I want to override the /vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator.Costs.php class.
or Can I override the PaypalExpress Class?
If possible then how and where I can find/create clone of these classes.

Thanks
Harpal Singh

Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: How to add additional charges in PayPal?

Post by Harpal Singh » 12 Jun 2019, 11:45

Harpal Singh wrote:Can I use Costs decorator outside from vendors in my extension folder of project.
I want to override the /vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator.Costs.php class.
or Can I override the PaypalExpress Class?
If possible then how and where I can find/create clone of these classes.

Thanks
Harpal Singh
I have created PayPalExpress Provider in my ext but it shows both the providers while in admin.
What I want is to override some functions of PayPalExpress(in my extension) class.

Thanks
Harpal Singh

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

Re: How to add additional charges in PayPal?

Post by aimeos » 12 Jun 2019, 17:44

You have to name your overwritten class differently and use that in the "provider" field of the service panel in the admin interface
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply