Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

File PPAutoloader.php missing. #153

Closed
ebald opened this issue Nov 16, 2017 · 8 comments
Closed

File PPAutoloader.php missing. #153

ebald opened this issue Nov 16, 2017 · 8 comments

Comments

@ebald
Copy link

ebald commented Nov 16, 2017

General information

  • SDK/Library version :3.12.0
  • Environment: Running samples
  • PayPal-Debug-ID values:
  • Language, language version, and OS:

Issue description

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

@randstraw
Copy link

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

@ebald
Copy link
Author

ebald commented Nov 16, 2017

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
Copy link

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
Copy link
Author

ebald commented Nov 16, 2017

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
Copy link

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

@jaypatel512
Copy link
Contributor

@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
Copy link
Author

ebald commented Nov 18, 2017

@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
Copy link

Closing due to inactivity

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants