#kai_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1410177318206574642
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi @dim widget
It's nice to meet you here.
When is that error thrown? How are you installing the SDK?
Just manually copied under project folder
This is how current file structure looks
In vin.php , I've included stripe init.php like following:
/**
* Plugin Name: VIN Form
* Plugin URI:
* Description: VIN Form
* Version: 1.1.2
* Author:
* Author URI:
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Domain Path: /languages
* Text Domain: vin
*
* @package vin_form
*/
define( 'VIN_FROM_VERSION', '1.1.2' );
define( 'VIN_FROM_PATH', plugin_dir_path( __FILE__ ) );
define( 'VIN_FROM_URL', plugins_url( '', __FILE__ ) );
/**
* VIN_FORM
*/
add_action( 'plugins_loaded', function() {
require_once VIN_FROM_PATH . '/vendor/stripe/stripe-php/init.php';
require_once VIN_FROM_PATH . '/includes/shortcodes.php';
require_once VIN_FROM_PATH . '/includes/ajax.php';
require_once VIN_FROM_PATH . '/includes/payment.php';
});```
When I've updated sth like this: require_once VIN_FROM_PATH . 'vendor/autoload.php';
I got the following error in payment.php like screenshot:
// Set Stripe API key based on environment
$secret_key = self::IS_TEST_MODE ? self::STRIPE_TEST_SECRET_KEY : self::STRIPE_LIVE_SECRET_KEY;
\Stripe\Stripe::setApiKey($secret_key);
$this->stripe = new \Stripe\StripeClient($secret_key);
}```
This is payment.php
You can't use autoload unless you install via Composer, which you're not
Hmmm, how can I resolve in case of manual installation?
I followed this instruction: https://packagist.org/packages/stripe/stripe-php
Stripe PHP Library
current php version is 8.3.8 and this might cause any problem like posted?
The original error implies that not all the files/folders have been copied over and/or the path of your include is wrong
Nope, we support PHP 5.6.x
I got this error, but I can see this file existing in the directory
Let me check more details, and will keep you posted.
Why not just use Composer?
getting trouble with server access now, that's why I am trying manual installation
however, I could see some files weren't copied correctly, now I am fixing it.
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!