#Lucas974

1 messages · Page 1 of 1 (latest)

opaque muralBOT
dusky snow
#

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?

open hare
#

sorry I'm using Stripe Client Integration

dusky snow
#

i'm afraid that doesn't help me understand the exact integration you're using - did you follow a guide to get setup?

open hare
#

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);
    });
  });
}
dusky snow
#

what can be seen on the thank you page that you want to protect?

open hare
#

just a description of how to connect

#

will be better if no paid users can't see this

dusky snow
#

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

open hare
#

and using something like a localStorage ??

#

For you, the easiest way will be??

dusky snow
#

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?

open hare
#

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

dusky snow
#

like i mentioned, i'm not entirely certain why you need a number or even to include any sensitive details on that page

#

all you need to mention is to check your email for details of how to "connect"

#

assuming you're going down the email route

open hare
#

ok

#

thanks