Skip to content

fix(billing): Correct country code prefilled in razorpay checkout#5984

Open
Bowrna wants to merge 5 commits intofrappe:developfrom
Bowrna:correct_code_in_razorpay
Open

fix(billing): Correct country code prefilled in razorpay checkout#5984
Bowrna wants to merge 5 commits intofrappe:developfrom
Bowrna:correct_code_in_razorpay

Conversation

@Bowrna
Copy link
Copy Markdown
Contributor

@Bowrna Bowrna commented Mar 30, 2026

partly fixes: #5776

Edit: As phone number is optional, we will prefill contact only for users who has given contact number during signup and not otherwise

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.09%. Comparing base (fbfbd1b) to head (b141467).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #5984       +/-   ##
============================================
- Coverage    73.37%   51.09%   -22.28%     
============================================
  Files          110      886      +776     
  Lines        17428    73686    +56258     
  Branches       269      269               
============================================
+ Hits         12787    37650    +24863     
- Misses        4618    36013    +31395     
  Partials        23       23               
Flag Coverage Δ
dashboard 73.36% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Bowrna Bowrna force-pushed the correct_code_in_razorpay branch from 9f96c4f to c1a3390 Compare April 6, 2026 08:52
@Bowrna Bowrna changed the title Correct country code prefilled in razorpay checkout fix(billing): Correct country code prefilled in razorpay checkout Apr 6, 2026
@Bowrna Bowrna enabled auto-merge April 6, 2026 09:27
prefill: { email: team.doc?.user },
prefill: {
email: team.doc?.user,
...(getRazorpayContact() && { contact: getRazorpayContact() }),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contact: team.doc?.phone_number will suffice, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of undefined, the contact param should not be passed.

Copy link
Copy Markdown
Member

@ssiyad ssiyad Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If team.doc?.phone_number is undefined, this works as expected. If it is any other falsy value, contact: team.doc?.phone_number || undefined should work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be undefined or empty, that's why I added the spread operator to include contact param if it has defined value and not pass otherwise. let me know if it can be improved. i will include the changes and push it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ssiyad let me know if this comment can be resolved or do you have more feedback on this part?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show correct country code in RazorPay modal

2 participants