paypal / merchant-sdk-php

PHP SDK for integrating with PayPal's Express Checkout / MassPay / Web Payments Pro APIs
Other
230 stars 201 forks source link

File PPAutoloader.php missing. #153

Closed ebald closed 6 years ago

ebald commented 6 years ago

General information

Issue description

Warning: require(PPAutoloader.php): failed to open stream: No such file or directory.

randstraw commented 6 years ago

Did you install the SDK with composer? https://github.com/paypal/merchant-sdk-php#running-the-sample

ebald commented 6 years ago

Yes I did, but the file is missing anyway. The way to avoid this message is modifying the PPBootstrap.php with something like this:

if(file_exists( dirname(__FILE__). '/vendor/autoload.php')) {
require 'vendor/autoload.php';
} else {
echo "Please, install the SDK with composer first.";
}
randstraw commented 6 years ago

Did composer give you /vendor/autoload.php and are you able to move forward?

What is your use case? I would advise the REST API SDK if you are able to use it https://github.com/paypal/PayPal-PHP-SDK.

ebald commented 6 years ago

Yes, with composer works great. I need to use this because I've a Paypal PRO account, and need features that aren't in the Paypal PHP SDK.

About this bug report, I suggest that the reference for a file that isn't into the package could be confusing for first time users. It's just a suggestion, thank you for your time!

randstraw commented 6 years ago

I agree @ebald, are you interested in submitting a pull request for your fix?

jaypatel512 commented 6 years ago

@ebald ! The PPBootstrap.php file is used for Sample purposes only. The idea here is to demonstrate how to load the package into your application. I would recommend removing reference to PPBootstrap from your application, as it might change/break/removed in future revisions.

ebald commented 6 years ago

@pp-randy I'll submit a pull request.

@jaypatel512 I think that the samples are great to know how to implement this software. Probably with a little modification to the PPBootstrap.php will be enough to avoid future problems.

randstraw commented 6 years ago

Closing due to inactivity