#kennethpogi323

1 messages · Page 1 of 1 (latest)

wooden obsidianBOT
dire fog
#

hi

#

i follow the steps provided by stripe in youtube

upbeat heart
#

That's just your publishable key, right? Publishable keys are meant to be publicly accessible - that's why we limit what kinds of requests they're actually able to do

dire fog
#

my secret key also

#

heres the code i use

#

document.addEventListener('DOMContentLoaded', async () => {
const stripe = Stripe('<?= $_ENV["STRIPE_PUBLISHABLE_KEY"]; ?>', {
apiVersion: '2020-08-27',
});

#

const {error, paymentIntent} = await stripe.confirmCardPayment(
'<?= $paymentIntent->client_secret; ?>', {
payment_method: {
card: cardElement,
},
},
);
if(error) {
addMessage(error.message);

upbeat heart
#

That's not a secret key - that the client_secret of the PaymentIntent

#

That's also meant to be visible in your code client-side

#

It's for confirming that specific PaymentIntent

dire fog
#

MB so its not secret key?

#

thanks