-
Notifications
You must be signed in to change notification settings - Fork 0
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
[PM-13717] Fix legacy credit rebate for migrated MSPs #9
base: main
Are you sure you want to change the base?
[PM-13717] Fix legacy credit rebate for migrated MSPs #9
Conversation
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.
3 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
|
||
await stripeAdapter.CustomerUpdateAsync(provider.GatewayCustomerId, new CustomerUpdateOptions | ||
if (legacyOrganizationCredit < 0) |
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.
logic: This condition might prevent applying positive credits. Consider if this is the intended behavior.
|
||
logger.LogInformation("CB: Applied {Credit} credit to provider ({ProviderID})", organizationCancellationCredit, provider.Id); | ||
logger.LogInformation("CB: Applied {Credit} credit to provider ({ProviderID})", organizationCancellationCredit + legacyOrganizationCredit, provider.Id); |
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.
style: Update the log message to differentiate between cancellation credit and legacy credit for clarity.
Task<CustomerBalanceTransaction> CustomerBalanceTransactionCreate(string customerId, | ||
CustomerBalanceTransactionCreateOptions options); |
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.
style: Consider adding XML documentation for this new method to improve code clarity and maintainability
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-13717
📔 Objective
This PR fixes 2 issues:
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changesGreptile Summary
This pull request addresses issues with legacy credit rebates for migrated MSPs in the billing system. Key changes include:
ApplyCreditAsync
inProviderMigrator.cs
to correctly handle legacy credit rebatesCustomerBalanceTransactionCreate
method toIStripeAdapter
interfaceCustomerBalanceTransactionCreate
inStripeAdapter
class using Stripe's APICustomerBalanceTransactionService
inStripeAdapter
for improved balance managementThese changes enhance the accuracy and transparency of credit applications for migrated MSP organizations, fixing issues with legacy plan detection and credit allocation.