DiogoNeves
DiogoNeves

Reputation: 1777

PayPal Adaptive Payments and SOAP SDK

I'm integrating Adaptive Payments in a PHP application that already uses the PayPal SOAP SDK for MassPay. Everything looks very simple the problem is when calling the MassPay integration it now has a name clash because CallerServices were already declared by the Adaptive Payments API.

Is there any easy (and good) way for those APIs to live together? How can I require both APIs if they declare objects with the same name?

I checked if both CallerServices.php files were the same but they aren't...

Error message: Fatal error: Cannot redeclare class CallerServices in (...)/PayPal/CallerServices.php on line 35

Thank you.

Upvotes: 2

Views: 861

Answers (1)

JAL
JAL

Reputation: 21563

What version of PHP are you using? If >= 5.3, you will be able to resolve this by declaring a namespace.

Upvotes: 2

Related Questions