#Lucas974
1 messages · Page 1 of 1 (latest)
I'm not sure what the ideal path here is, as we don't have a lot of context on Firebase. When you say you want to "backup the name and email" what do you mean? Do you want to store it in your database? Or cache it as a cookie in the browser?
Just after a successful purchase I wish to save name/email in variables to be able to send them to firebase.
Actually I just use stripe-js. No way to do that.
Okay, but what do you mean by "save"? That could mean many things
just store the couple name/email in an array/object or each one in a variable
after a successful payment I want to create the login for the client using Firebase (passwordless auth)
For later, allow him to download his invoice or the digital product
But really, I don't know how to proceed.
Perhaps I'm doing it in the wrong way...
Do you know how Firebase is going to ingest that data?
{name: ..; email:...}
Okay, and what Stripe product(s) are you using to create the payment? Payment Element? Card Element? Custom payment form?
I'm using Stripe-js
async function handleCheckout() {
const stripe = await getStripe();
const { error } = await stripe.redirectToCheckout({
lineItems: [
{
price: import.meta.env.VITE_STRIPE_PRODUCT_ID,
quantity: 1,
},
],
mode: 'payment',
successUrl: `http://127.0.0.1:5173/thankyou`,
cancelUrl: `http://127.0.0.1:5173/`,
billingAddressCollection: 'required',
});
console.warn(error.message);
}
Stripe checkout