#Lucas974
1 messages · Page 1 of 1 (latest)
hello! what do you mean by you're using client integration - can you share the exact documentation which you referred to to implement your integration?
sorry I'm using Stripe Client Integration
i'm afraid that doesn't help me understand the exact integration you're using - did you follow a guide to get setup?
nop
I did it myself
I use react-router, and stripe-js
stripe checkout
the website i did works, but anyone going to /thankyou can see
import { loadStripe } from '@stripe/stripe-js';
export default function handlePayment(event){
const stripeLoadedPromise = loadStripe(import.meta.env.VITE_STRIPE_API_KEY);
stripeLoadedPromise.then(stripe => {
stripe.redirectToCheckout({
lineItems:[{
price: import.meta.env.VITE_STRIPE_PRODUCT_ID,
quantity: 1
}],
mode: "payment",
successUrl: `${import.meta.env.VITE_URL_ROOT}/thankyou`,
cancelUrl: `${import.meta.env.VITE_URL_ROOT}/`,
billingAddressCollection: 'required',
})
.then(response => {
console.log(response.error);
})
.catch(error => {
console.log(error);
});
});
}
what can be seen on the thank you page that you want to protect?
there's multiple ways to go about this, one idea for example - you can always implement it such that you email the customer details on how to connect instead of displaying it on the thank you page
i don't know what the easiest way will be since I don't know the details of your implementation.
why do you need localstorage?
i was thinking about storing a number
and then user will point to /thankyou/:number
If someone has paid share this url, it doesnt work, as number is a random number