#r3v3rb
1 messages ยท Page 1 of 1 (latest)
calling the variable the same as the function is highly confusing if its meant to be user created...
Which placeholder are you referring to?
lol, the one in the success_url -- {CHECKOUT_SESSION_ID}
The placeholder {CHECKOUT_SESSION_ID} is where stripe will set checkout session ID into this placeholder once the Checkout Session is completed. At the time when you set this placeholder in success url, Checkout Session is not created yet. {CHECKOUT_SESSION_ID} is to tell Stripe which query parameter that Stripe should set the Checkout Session ID to
Sure, just read a bit more and found this: https://stripe.com/docs/payments/checkout/custom-success-page
However, confusingly reading the code here: // The price ID passed from the front end. // $priceId = $_POST['priceId']; $priceId = '{{PRICE_ID}}';
It looks like PRICE_ID is also a variable yet actually that is passed via the form subsmission or does stripe look for that in the stored post data by default and substitute too?
PRICE_ID here is where your code should set the actual price ID. Stripe doesn't look for the post data and substitute it
So in your documents {} == Stripe Variable vs {{}} == developer variable ๐
Yes {{VAR}} is generally a placeholder you'd replace