-
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-7452] Resolve PayPal issue #25
base: main
Are you sure you want to change the base?
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.
2 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile
parsedEvent.Id, | ||
exception.Message); | ||
|
||
throw; |
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: Re-throwing the exception after logging. Ensure this change in behavior is intended and handled appropriately by the caller.
parsedEvent.Id, | ||
exception.Message); | ||
|
||
throw; |
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: Another instance of re-throwing the exception. Verify that this is the desired behavior.
@@ -261,6 +261,8 @@ invoice is | |||
|
|||
private async Task<bool> AttemptToPayInvoiceWithBraintreeAsync(Invoice invoice, Customer customer) | |||
{ | |||
LogBraintreeConfiguration(); |
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 moving this method call to the constructor to ensure logging happens only once per service instance
|
||
private void LogBraintreeConfiguration() | ||
{ | ||
var environment = System.Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); |
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: Use IHostEnvironment instead of Environment.GetEnvironmentVariable for consistency with ASP.NET Core practices
} | ||
else | ||
{ | ||
_logger.LogInformation("Braintree Merchant ID: {MerchantId}", merchantId[..5]); |
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: Logging even partial keys could be a security risk. Consider using a boolean flag instead
} | ||
else | ||
{ | ||
_logger.LogInformation("Braintree Public Key: {PublicKey}", publicKey[..5]); |
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: Logging even partial keys could be a security risk. Consider using a boolean flag instead
} | ||
else | ||
{ | ||
_logger.LogInformation("Braintree Private Key: {PrivateKey}", privateKey[..5]); |
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: Logging even partial keys could be a security risk. Consider using a boolean flag instead
🎟️ Tracking
📔 Objective
📸 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
Enhanced error logging and Braintree configuration debugging for Stripe invoice processing.
InvoiceCreatedHandler
for 'invoice.created' event handlingLogBraintreeConfiguration()
method inStripeEventUtilityService
for QA environment debuggingInvoiceCreatedHandler
, potentially affecting error handling