spl_autoload_register(function ($class) { $prefix = 'Stripe\\'; $baseDir = __DIR__ . '/stripe-php/lib/'; $len = strlen($prefix); if (strncmp($prefix, $class, $len) !== 0) { return; } $relativeClass = substr($class, $len); $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; if (file_exists($file)) { require $file; } }); An error has happened during application run. See exception log for details.