0
votes

I new in Composer. I have been searching and I have managed to install it:
curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/bin/composer

If I understand the second line makes it accessible globally in my computer.

I have checked that have installed correctly as I have written composer in the terminal and it gives me a list of commands and descriptions.

Now I want to install Stripe. I follow that instructions: https://stripe.com/docs/recipes/subscription-signup#creating-the-signup-form-using-checkout

I write in the terminal: composer require stripe/stripe-php I see they install a folder in the root of the computer (in a Mac, the house with my name) the folder: vendor/stripe

Now the Stripe instructions have a file with: require_once('vendor/autoload.php'); If I am in MAMP how should I reach to the Stripe files with the require? How should be the link?

1
Are you asking where the require should be in your project? What is your codebase based on?Jonnix
In MAMP/htdocs/myProject/stripe/create_subscription I have that line of code provided by the Stripe tutorial: require_once('vendor/autoload.php'); My question is what link should that require have?Nrc

1 Answers

0
votes

In your project (inside MAMP) you should run composer install. There you will see the vendor file appear and will be easier for you to track the path.

As you correctly mentioned you will require the autoload.php file which is in inside the vendor file which will appear.

Just make sure that before run the composer install that you are inside your project folder.