Add event type redirect URL (#8385)
parent
8a2ab68e9a
commit
2ac5ef10ba
|
@ -57,19 +57,17 @@ const PaymentForm = (props: Props) => {
|
|||
email: router.query.email,
|
||||
};
|
||||
if (paymentOption === "HOLD" && "setupIntent" in props.payment.data) {
|
||||
const setupIntentData = props.payment.data as unknown as StripeSetupIntentData;
|
||||
payload = await stripe.confirmSetup({
|
||||
elements,
|
||||
confirmParams: {
|
||||
return_url: `${CAL_URL}/booking/${props.bookingUid}`,
|
||||
return_url: props.eventType.successRedirectUrl || `${CAL_URL}/booking/${props.bookingUid}`,
|
||||
},
|
||||
});
|
||||
} else if (paymentOption === "ON_BOOKING") {
|
||||
const paymentData = props.payment.data as unknown as StripePaymentData;
|
||||
payload = await stripe.confirmPayment({
|
||||
elements,
|
||||
confirmParams: {
|
||||
return_url: `${CAL_URL}/booking/${props.bookingUid}`,
|
||||
return_url: props.eventType.successRedirectUrl || `${CAL_URL}/booking/${props.bookingUid}`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue