fix(payments): add return_url for Alipay PaymentIntent confirmation; fixes #19138 (#19153)

* Update README.md

* fix(payments): add return_url for Alipay PaymentIntent confirmation; fixes #19138

* Fix: update confirmPayment to use confirmParams and resolve TS errors

* Update Payment.tsx

* Update

* fix build error

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
Shivansh KumarandAnik Dhabal Babu authored and GitHub committed 2025-03-05 11:57:43 -03:00
1 parent be1377e9af
commit 1b111c8add
2 files changed
+8

No files matched your search

@@ -6,6 +6,7 @@ import getStripe from "@calcom/app-store/stripepayment/lib/client";
import type { Props, States } from "@calcom/features/ee/payments/components/Payment";
import { PaymentFormComponent } from "@calcom/features/ee/payments/components/Payment";
import type { PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
const StripePaymentComponent = (
@@ -63,6 +64,9 @@ const StripePaymentComponent = (
payload = await stripe.confirmPayment({
elements,
redirect: "if_required",
confirmParams: {
return_url: `${WEBAPP_URL}/booking/${params.uid}`,
},
});
if (payload.paymentIntent) {
params.payment_intent = payload.paymentIntent.id;