feat: redirect after booking: option to forward parameters
What does this PR do?
Fixes #14223 /claim #14223
https://github.com/calcom/cal.com/assets/74371312/8939cca9-8570-4577-b081-5399e1ec549c
Type of change
- New feature (non-breaking change which adds functionality)
Mandatory Tasks
- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
@Amit91848 is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.
Graphite Automations
"Add consumer team as reviewer" took an action on this PR • (03/27/24)
1 reviewer was added to this PR based on Keith Williams's automation.
"Add community label" took an action on this PR • (03/27/24)
1 label was added to this PR based on Keith Williams's automation.
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
This PR introduced no changes to the JavaScript bundle! 🙌
Heads up @Amit91848 when testing with a booking that requires payment, the payment specific params are still being added.
Ex.
http://localhost:3001/?payment_intent=pi_*****&payment_intent_client_secret=pi_***8&redirect_status=succeeded
Hmm, will look into it.
Ex.
http://localhost:3001/?payment_intent=pi_*****&payment_intent_client_secret=pi_***8&redirect_status=succeeded
Hey @joeauyeung, those params are being automatically added by Stripe on the return_url. Tried searching but unfortunately stripe does not give any option to not include those.
You can instead choose redirect: "if_required" and not pass return_url and handle state logic after payment on our end.
https://github.com/calcom/cal.com/blob/d59e68de6d2a6476c7f2e0ccbe63c545223e0ff3/packages/features/ee/payments/components/Payment.tsx#L111-L116
Relevant docs: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-return_url
This should fix stripe passing params.
https://github.com/calcom/cal.com/assets/74371312/b7f4d1a4-a9f7-4c4c-8096-1a5bb5d5f0f0
Didn't realize we were using those stripe params, all tests are passing now.
This PR is being marked as stale due to inactivity.