I started a web application using Slim 3. I went to add in the Stripe API and got a Slim Application error message. I removed the Stripe API code, and the error went away.
// Setup
\Stripe\Stripe::setApiKey('xx_test_XXXXxXxXXXXXxXxXXxXXXxXX');
// Get Token
$token = $_POST['stripeToken'];
// Charge the user's card:
$charge = \Stripe\Charge::create(array(
"amount" => 1000,
"currency" => "usd",
"description" => "Example charge",
"source" => $token,
));
I've Googled a few things, but still haven't found the source of the problem. I suspect that the \Stripe\
is the culprit, but I don't know why it is.