-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(payments): add return_url for Alipay PaymentIntent confirmation; fixes #19138 #19153
base: main
Are you sure you want to change the base?
Conversation
@ShivanshKumar760 is attempting to deploy a commit to the cal-staging Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (02/07/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (02/07/25)1 label was added to this PR based on Keith Williams's automation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments
packages/prisma/schema.prisma
Outdated
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
//directUrl = env("DATABASE_DIRECT_URL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -178,6 +179,7 @@ const PaymentForm = (props: Props) => { | |||
payload = await stripe.confirmPayment({ | |||
elements, | |||
redirect: "if_required", | |||
return_url: "https://app.cal.com", // Redirect users to app.cal.com after payment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to hardcode the URL. We have a certain constant; instead, use WEBAPP_URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
// return_url: `${window.location.origin}/payment-success`, // adjust this URL as needed | ||
return_url: "https://app.cal.com", // Redirect users to app.cal.com after payment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -1,3 +1,4 @@ | |||
/*elint-disable*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed eslint-disable comment
README.md
Outdated
@@ -46,7 +46,7 @@ | |||
|
|||
<img width="100%" alt="booking-screen" src="https://github.com/calcom/cal.com/assets/8019099/407e727e-ff19-4ca4-bcae-049dca05cf02"> | |||
|
|||
# Scheduling infrastructure for absolutely everyone | |||
# Schedulingg infrastructure for absolutely everyone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in README.md fixed
confirmParams: { | ||
return_url: WEBAPP_URL, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, one thing—shouldn't the return_url be the booking success page?
-Fixes #19138
This PR addresses the issue where Cal.com was reporting an error from Stripe when confirming a PaymentIntent using Alipay. Stripe requires that a return_url parameter be provided for Alipay payments so that customers can be redirected back to the application after authentication. With this change, the payment confirmation now includes the return_url parameter (set to https://app.cal.com), ensuring that users are properly redirected to our application after an Alipay payment is processed.