Просмотр исходного кода

Merge pull request #28851 from overleaf/ls-collect-business-details-in-stripe-elements

Collect business details in Stripe Elements

GitOrigin-RevId: 5a3affd1916b2ba659e007a7c25f64879899fd1a
Liangjun Song 1 год назад
Родитель
Сommit
b8da04078d

+ 3 - 0
services/web/app/src/Features/Subscription/Errors.js

@@ -30,6 +30,8 @@ class HasPastDueInvoiceError extends OError {}
 
 
 class HasNoAdditionalLicenseWhenManuallyCollectedError extends OError {}
 class HasNoAdditionalLicenseWhenManuallyCollectedError extends OError {}
 
 
+class InvalidTaxIdError extends OError {}
+
 /**
 /**
  * @typedef {Object} PaymentActionRequiredInfo
  * @typedef {Object} PaymentActionRequiredInfo
  * @property {string} PaymentActionRequiredInfo.clientSecret
  * @property {string} PaymentActionRequiredInfo.clientSecret
@@ -72,4 +74,5 @@ module.exports = {
   SubtotalLimitExceededError,
   SubtotalLimitExceededError,
   HasPastDueInvoiceError,
   HasPastDueInvoiceError,
   HasNoAdditionalLicenseWhenManuallyCollectedError,
   HasNoAdditionalLicenseWhenManuallyCollectedError,
+  InvalidTaxIdError,
 }
 }

+ 6 - 0
services/web/frontend/extracted-translations.json

@@ -551,6 +551,7 @@
   "end_time_utc": "",
   "end_time_utc": "",
   "ensure_recover_account": "",
   "ensure_recover_account": "",
   "enter_any_size_including_units_or_valid_latex_command": "",
   "enter_any_size_including_units_or_valid_latex_command": "",
+  "enter_tax_id_number": "",
   "enter_the_code": "",
   "enter_the_code": "",
   "enter_the_confirmation_code": "",
   "enter_the_confirmation_code": "",
   "enter_the_number_of_licenses_youd_like_to_add_to_see_the_cost_breakdown": "",
   "enter_the_number_of_licenses_youd_like_to_add_to_see_the_cost_breakdown": "",
@@ -887,6 +888,7 @@
   "invalid_password_too_similar": "",
   "invalid_password_too_similar": "",
   "invalid_regular_expression": "",
   "invalid_regular_expression": "",
   "invalid_request": "",
   "invalid_request": "",
+  "invalid_tax_id_number": "",
   "invalid_upload_request": "",
   "invalid_upload_request": "",
   "invite": "",
   "invite": "",
   "invite_expired": "",
   "invite_expired": "",
@@ -1587,6 +1589,7 @@
   "select_projects": "",
   "select_projects": "",
   "select_size": "",
   "select_size": "",
   "select_tag": "",
   "select_tag": "",
+  "select_tax_id_type": "",
   "select_user": "",
   "select_user": "",
   "selected": "",
   "selected": "",
   "selection_deleted": "",
   "selection_deleted": "",
@@ -1795,6 +1798,8 @@
   "tag_name_is_already_used": "",
   "tag_name_is_already_used": "",
   "tags": "",
   "tags": "",
   "take_survey": "",
   "take_survey": "",
+  "tax_id_number": "",
+  "tax_id_type": "",
   "tell_the_project_owner_and_ask_them_to_upgrade": "",
   "tell_the_project_owner_and_ask_them_to_upgrade": "",
   "template": "",
   "template": "",
   "template_description": "",
   "template_description": "",
@@ -1858,6 +1863,7 @@
   "this_is_a_beta_release_for_the_new_overleaf_editor": "",
   "this_is_a_beta_release_for_the_new_overleaf_editor": "",
   "this_is_a_new_feature": "",
   "this_is_a_new_feature": "",
   "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "",
   "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "",
+  "this_organization_is_tax_exempt": "",
   "this_project_already_has_maximum_collaborators": "",
   "this_project_already_has_maximum_collaborators": "",
   "this_project_contains_a_file_called_output_pdf": "",
   "this_project_contains_a_file_called_output_pdf": "",
   "this_project_exceeded_collaborator_limit": "",
   "this_project_exceeded_collaborator_limit": "",

+ 6 - 0
services/web/locales/en.json

@@ -702,6 +702,7 @@
   "end_time_utc": "End time (UTC)",
   "end_time_utc": "End time (UTC)",
   "ensure_recover_account": "This will ensure that it can be used to recover your __appName__ account in case you lose access to your primary email address.",
   "ensure_recover_account": "This will ensure that it can be used to recover your __appName__ account in case you lose access to your primary email address.",
   "enter_any_size_including_units_or_valid_latex_command": "Enter any size (including units) or valid LaTeX command",
   "enter_any_size_including_units_or_valid_latex_command": "Enter any size (including units) or valid LaTeX command",
+  "enter_tax_id_number": "Enter tax ID number",
   "enter_the_code": "Enter the 6-digit code sent to __email__.",
   "enter_the_code": "Enter the 6-digit code sent to __email__.",
   "enter_the_confirmation_code": "Enter the 6-digit confirmation code sent to __email__.",
   "enter_the_confirmation_code": "Enter the 6-digit confirmation code sent to __email__.",
   "enter_the_number_of_licenses_youd_like_to_add_to_see_the_cost_breakdown": "Enter the number of licenses you’d like to add to see the cost breakdown.",
   "enter_the_number_of_licenses_youd_like_to_add_to_see_the_cost_breakdown": "Enter the number of licenses you’d like to add to see the cost breakdown.",
@@ -1130,6 +1131,7 @@
   "invalid_password_too_similar": "Password is too similar to parts of email address.",
   "invalid_password_too_similar": "Password is too similar to parts of email address.",
   "invalid_regular_expression": "Invalid regular expression",
   "invalid_regular_expression": "Invalid regular expression",
   "invalid_request": "Invalid Request. Please correct the data and try again.",
   "invalid_request": "Invalid Request. Please correct the data and try again.",
+  "invalid_tax_id_number": "Invalid tax ID number",
   "invalid_upload_request": "The upload failed. If the problem persists, <0>let us know</0>.",
   "invalid_upload_request": "The upload failed. If the problem persists, <0>let us know</0>.",
   "invalid_zip_file": "Invalid zip file",
   "invalid_zip_file": "Invalid zip file",
   "invite": "Invite",
   "invite": "Invite",
@@ -2043,6 +2045,7 @@
   "select_projects": "Select Projects",
   "select_projects": "Select Projects",
   "select_size": "Select size",
   "select_size": "Select size",
   "select_tag": "Select tag __tagName__",
   "select_tag": "Select tag __tagName__",
+  "select_tax_id_type": "Select tax ID type",
   "select_user": "Select user",
   "select_user": "Select user",
   "selected": "Selected",
   "selected": "Selected",
   "selected_by_overleaf_staff": "Selected by Overleaf staff",
   "selected_by_overleaf_staff": "Selected by Overleaf staff",
@@ -2290,6 +2293,8 @@
   "tags": "Tags",
   "tags": "Tags",
   "take_me_home": "Take me home!",
   "take_me_home": "Take me home!",
   "take_survey": "Take survey",
   "take_survey": "Take survey",
+  "tax_id_number": "Tax ID number",
+  "tax_id_type": "Tax ID type",
   "tell_the_project_owner_and_ask_them_to_upgrade": "<0>Tell the project owner</0> and ask them to upgrade their Overleaf plan if you need more compile time.",
   "tell_the_project_owner_and_ask_them_to_upgrade": "<0>Tell the project owner</0> and ask them to upgrade their Overleaf plan if you need more compile time.",
   "template": "Template",
   "template": "Template",
   "template_approved_by_publisher": "This template has been approved by the publisher",
   "template_approved_by_publisher": "This template has been approved by the publisher",
@@ -2378,6 +2383,7 @@
   "this_is_a_new_feature": "This is a new feature",
   "this_is_a_new_feature": "This is a new feature",
   "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "This is the file that references pulled from your reference manager will be added to.",
   "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "This is the file that references pulled from your reference manager will be added to.",
   "this_is_your_template": "This is your template from your project",
   "this_is_your_template": "This is your template from your project",
+  "this_organization_is_tax_exempt": "This organization is tax exempt",
   "this_project_already_has_maximum_collaborators": "This project already has the maximum number of collaborators permitted on the owner’s plan. This means you can view but not edit or review the project.",
   "this_project_already_has_maximum_collaborators": "This project already has the maximum number of collaborators permitted on the owner’s plan. This means you can view but not edit or review the project.",
   "this_project_contains_a_file_called_output_pdf": "The project contains a file called output.pdf. If that file exists, rename it.",
   "this_project_contains_a_file_called_output_pdf": "The project contains a file called output.pdf. If that file exists, rename it.",
   "this_project_exceeded_collaborator_limit": "This project exceeded the collaborator limit for your plan. All other users now have view-only access.",
   "this_project_exceeded_collaborator_limit": "This project exceeded the collaborator limit for your plan. All other users now have view-only access.",