However, the create_session.php SC file gives this error:
"message":"Class 'Stripe\\StripeClient' not found"
I've looked in the /public_html/dmxConnectLib/modules/stripe.php on line 16 as reported in the rest of the error and it looks to be the secret key:
$this->stripe = new \Stripe\StripeClient(CONFIG('STRIPE_SECRET_KEY'));
I've set this in the Server Connect Settings / Stripe - Stripe Secret Key but it seems to not be providing this when viewing the page.
Can I assume this is a bug? I've even put the secret key directly into the API Key in the Advanced Options for the Create Checkout Session action but it still produces the same error.
UPDATE: I've hard-coded my secret key into the into the module script to see if that fixes it but I get the same error:
$this->stripe = new \Stripe\StripeClient('sk_test_restofthekeyhere');
They are still working on docs. George asked if i could help them out with videos. Literally just started to look an hour ago. Got as far as the Stripe buy button which i have managed to get working, very like the old PayPal generated buttons. very static, no dynamic settings.
They refers to @Teodor who has promised to do this after his well-deserved holiday.
PS: If it is any consolation, I have been waiting on this for months so that I can continue with the Boutique series of videos.
The tutorial Teodor put up a few weeks ago is actually all that seems to be needed to get up and running but it's the bug which needs addressing so I'm desperately hoping this can be sorted quickly as I'm due to launch a site very soon but can't until this is fixed.
Your script works fine. However, that is a Buy Now button whereas I'm trying to work with the Stripe Embedded Checkout. I think that's where the bug lies.
If you have some time, can you create a simple Data Store with just the price and quantity fields and then create the embedded checkout to work with it?
function __construct($app) {
$this->stripe = new \Stripe\StripeClient(CONFIG('STRIPE_SECRET_KEY'));
parent::__construct($app);
}
seems to be a central function called by all the stripe checkout functions so i cant understand why "buynow" works but embedded checkout doesn't (Patrick's coding is way over my head!)
I suppose that "STRIPE_SECRET_KEY" is set but it doesn't seem this value to be passed to the session...
So
when this is called $this->stripe = new \Stripe\StripeClient(CONFIG('STRIPE_SECRET_KEY'));
you get this error "message":"Class 'Stripe\\StripeClient' not found"
Obviously the seesion variable is not set (empty)
Just thinking out loud...
Forgive me if I say something wrong