title: Integrating PayPal Rest API to website
body: <p>I built an e-commerce site for a client with a custom cart, and shopping experience and now it's time to integrate a payment method. He wants to use Paypal. I have been messing around with Paypal trying to get it to work for hours now and cannot seem to figure it out.</p>
  
  <p>First attempt - I made a custom Paypal button using html that fills in the variables using PHP to come up with pricing and item details. This worked fine but I need to get a response from Paypal once the payment is successful so I can handle the details on my website which I couldn't figure out how to do making a custom button.</p>
  
  <p>Second attempt - I am now trying to use this tutorial to use the Paypal REST API:
  <a href="http://earlysandwich.com/programming/php/integrate-paypal-rest-api-using-php-294/" rel="nofollow">http://earlysandwich.com/programming/php/integrate-paypal-rest-api-using-php-294/</a></p>
  
  <p>I understand all the steps in the tutorial. The error I am getting when running create.php is:
  Fatal error: Class 'ApiContext' not found in /bootstrap.php on line 4</p>
  
  <p>So I figured it's because I don't have the Paypal API included in my project.
  I downloaded the Paypal API from here <a href="https://github.com/paypal/PayPal-PHP-SDK/releases" rel="nofollow">https://github.com/paypal/PayPal-PHP-SDK/releases</a>
  (as I don't understand how to use 'composer' or CURL or any of those things :(  )</p>
  
  <p>I uploaded it onto my server under the folder /PayPal-PHP-SDK</p>
  
  <p>I went back to my /bootstrap.php file and put the following line of code:
  require './PayPal-PHP-SDK/autoload.php';</p>
  
  <p>I am still getting the same Fatal error.</p>
  
  <p>Is this the way I should be going about getting Paypal included or is there an easier way? I simply need to pass an amount to Paypal &amp; get a response if the payment was successful. </p>
  
  <p>Any help at all is greatly appreciated!!</p>