diff --git a/src/component/subscribe/StripeSubscriptionButton.jsx b/src/component/subscribe/StripeSubscriptionButton.jsx
index 1bf50b6..1641f2e 100644
--- a/src/component/subscribe/StripeSubscriptionButton.jsx
+++ b/src/component/subscribe/StripeSubscriptionButton.jsx
@@ -8,7 +8,7 @@ import { useNavigate } from 'react-router-dom';
//const stripePromise = loadStripe('your_stripe_publishable_key');
const stripePromise = loadStripe('pk_test_51RqL5WLjZLojw6IZmEpwFidNZSl9lLlVUHNvuFZNEz1eTR9XXepnyyVhfvXe9cp4eMnqkDPpoe9wxLLRSV0dxRee00UfhayUOT');
-const CheckoutForm = ({ priceId, customerId }) => {
+const CheckoutForm = ({ priceId, customerId ,option_name }) => {
const stripe = useStripe();
const elements = useElements();
const navigate = useNavigate();
@@ -22,6 +22,7 @@ const CheckoutForm = ({ priceId, customerId }) => {
let reqData = {
priceId : priceId,
customerId: customerId,
+ option_name: option_name,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
@@ -45,10 +46,10 @@ const CheckoutForm = ({ priceId, customerId }) => {
);
};
-const StripeSubscriptionButton = ({ priceId, customerId }) => {
+const StripeSubscriptionButton = ({ priceId, customerId ,option_name}) => {
return (
-
+
);
};
diff --git a/src/component/subscribe/Subscribe.jsx b/src/component/subscribe/Subscribe.jsx
index 8b74d8c..b611f51 100644
--- a/src/component/subscribe/Subscribe.jsx
+++ b/src/component/subscribe/Subscribe.jsx
@@ -13,6 +13,7 @@ export default function Subscribe() {
const {state: {selectedSubscription,customerId}} = useLocation()
console.log('selectedSubscription', selectedSubscription)
+ console.log('selectedSubscription.option_name',selectedSubscription.option_name)
console.log('customerId', customerId)
let [activePaymentType, setActivePaymentType] = useState('previous')
@@ -36,7 +37,7 @@ export default function Subscribe() {
}
<>
-
+
>