fix(billing): Correct country code prefilled in razorpay checkout#5984
fix(billing): Correct country code prefilled in razorpay checkout#5984Bowrna wants to merge 5 commits intofrappe:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9f96c4f to
c1a3390
Compare
| prefill: { email: team.doc?.user }, | ||
| prefill: { | ||
| email: team.doc?.user, | ||
| ...(getRazorpayContact() && { contact: getRazorpayContact() }), |
There was a problem hiding this comment.
contact: team.doc?.phone_number will suffice, right?
There was a problem hiding this comment.
in case of undefined, the contact param should not be passed.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@ssiyad let me know if this comment can be resolved or do you have more feedback on this part?
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