-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(data-migration): add connector customer and mandate details support for multiple profiles #8473
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
Merged
likhinbopanna
merged 8 commits into
main
from
8464-feature-allow-data-migration-at-profile-level
Jul 1, 2025
Merged
feat(data-migration): add connector customer and mandate details support for multiple profiles #8473
likhinbopanna
merged 8 commits into
main
from
8464-feature-allow-data-migration-at-profile-level
Jul 1, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ort for multiple profiles
Changed Files
|
2 tasks
8b48cee
to
bb9e2fa
Compare
…ta-migration-at-profile-level
jagan-jaya
reviewed
Jun 30, 2025
jagan-jaya
previously approved these changes
Jun 30, 2025
jarnura
requested changes
Jun 30, 2025
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.
Is the MCA are validated against merchant?
Is the MCA are validated against merchant? |
jarnura
approved these changes
Jul 1, 2025
jagan-jaya
approved these changes
Jul 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This pull request enhances the data migration API to support migrating customer and payment method data across multiple business profiles in a single request.
Specifically, the following changes have been made:
Customer Data Migration:
PaymentMethodRecord
to allowmerchant_connector_id
to accept comma-separated string values.PaymentMethodCustomerMigrate
to use aVec
of connector-specific customer details.TryFrom<PaymentMethodRecord>
implementation forPaymentMethodCustomerMigrate
has been updated to parse this comma-separated string.Payment Method Migration:
PaymentMethodsMigrateForm
to accept a comma-separated string formerchant_connector_id
.get_payment_method_records
andmigrate_payment_methods
functions are updated to process multiplemerchant_connector_id
s.TryFrom
implementation forPaymentMethodMigrate
is modified to create aPaymentsMandateReference
for eachmerchant_connector_id
provided.Additional Changes
Motivation and Context
This allows migrating a payment method entity across multiple profiles (as
MerchantConnectorAccountId
is tied to a profile) during batch migration.How did you test it?
1. Batch migration for multiple profiles
cURL
Response
Things to verify in DB
connector_mandate_details
for a given payment_method_id in response has connector_mandate_id for multiple MCAsconnector_customer
for a given customer_id in response has mappings for multiple MCAs2. Batch migration for a single profile - For ensuring backwards compatibility
cURL
Response
Things to verify in DB
Sample migration data for multi profile migration
multi-migrate-sample.csv
Checklist
cargo +nightly fmt --all
cargo clippy