I first installed the PayPal API using Composer and managed to get the PHP code working:
<?php
$paypal = new \PayPal\Rest\ApiContext(
new \PayPal\Auth\OAuthTokenCredential(
'xxx',
'xxx')
);
?>
And I added this to the Index.php page
require_once __DIR__ . '/vendor/autoload.php';
As I said this used to work. Then I installed the FB API using the following Composer Json file:
{
"require": {
"paypal/rest-api-sdk-php": "1.10.0",
"facebook/graph-sdk" : "~5.0"
}
}
The FB is working but I can't seem to use the PayPal API anymore. I deleted the entire Vendor dir and uploaded it again on the server. The vendor/autload.php file looks likes this:
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit303a6e73ffa85ad916995f78100e5117::getLoader();
First I don't know why the file doesn't end with a ?>
? Is this normal?
When I try to call my paypal.php
file I get the infamous error:
Uncaught Error: Class 'PayPal\Rest\ApiContext' not found in ...