What i'm trying to do is use the Firebase Stripe extension inside of my web app but I don't know how to go about doing so. Am I supposed to setup Stripe in my app separately? Or use the Firebase SDKs? I'm using the Nextjs framework. I already have Firebase setup but don't know where to go from here.
Down Below is my Firebase.js file setup
/ Import the functions you need from the SDKs you need
import { initializeApp, getApps, getApp } from "firebase/app";
// TODO: Add SDKs for Firebase products that you want to use
import { getApp } from "@firebase/app";
import { getStripePayments } from "@stripe/firestore-stripe-payments";
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "XXXXXXXXXXXXXXX",
authDomain: "XXXXXXXXXXXXXXXX",
projectId: "XXXXXXXXXXX",
storageBucket: "XXXXXXXXXXX",
messagingSenderId: "XXXXXXXXX",
appId: "XXXXXXXXXXXXXXXXXXXXXXXX"
};
const app = getApp();
const payments = getStripePayments(app, {
productsCollection: "products",
customersCollection: "customers",
});
// Initialize Firebase
const app = initializeApp(firebaseConfig);