Fatal error: Class 'Stripe' not found in C: \ wamp \ www \

I get an error that the class was not found, but I have the correct path for where it is:

<?php

require_once('stripe-php-2.1.0/stripe/lib/Stripe.php');



Stripe::setApiKey('my_key');

var_dump($_POST['stripe-token']);

?>

Every article I come across claims that the problem (not including the correct path) is in require_one, include or require. (I tried all 3). But still no luck. My database calls follow the same format, and my WAMP server does not create problems with creating my database class.

This is copied directly from my file (copy paste)

site \ stripes-PHP-2.1.0 \ strip \ Lib \ Stripe.php

My php file, which I use to try to access Stripe, is in the same place as the "website".

PHP version 5.5.12

: http://www.larryullman.com/2013/01/09/writing-the-php-code-to-process-payments-with-stripe/

: http://www.youtube.com/watch?v=Lka_JBM9bbY

enter image description here

+4
2

, . :

\Stripe\Stripe::setApiKey('my_key');
+9

.

require_once ("stripe_folder/init.php");

:

\Stripe\Stripe::setApiKey('key_key_key_key_key_key');
-1

All Articles