I have to create a payment module for prestashop. This module use the paypal adaptivepayments-sdk which try to define a class named "Address". But also prestashop itself defines a class with this name. So the paypal-sdk always fails.
First I thought I can solve it with namespaces but I think I would have to edit all the paypal-sdk files. But I don't want to touch prestashop or paypal-sdk files. My next idea is to encapsulate it with a separate http request, but I want to avoid this because in my eyes this is a terrible practice.
Is there a way to encapsulate the sdk? Or is there any other way to solve this Problem?
Thanks in advance
quick solution:
composer install
in sdk directory, and then
require 'adaptivepayments-sdk-php/vendor/autoload.php';