mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
Fix PayPal IPN Logging (#3768)
* Remove request logging, fix txn_id correlation * Respond 400 when txn_id is missing * More cleanup
This commit is contained in:
@ -75,6 +75,14 @@ public class PayPalController : Controller
|
||||
|
||||
var transactionModel = new PayPalIPNTransactionModel(requestContent);
|
||||
|
||||
_logger.LogInformation("PayPal IPN: Transaction Type = {Type}", transactionModel.TransactionType);
|
||||
|
||||
if (string.IsNullOrEmpty(transactionModel.TransactionId))
|
||||
{
|
||||
_logger.LogError("PayPal IPN: Transaction ID is missing");
|
||||
return Ok();
|
||||
}
|
||||
|
||||
var entityId = transactionModel.UserId ?? transactionModel.OrganizationId;
|
||||
|
||||
if (!entityId.HasValue)
|
||||
@ -83,7 +91,7 @@ public class PayPalController : Controller
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
var verified = await _payPalIPNClient.VerifyIPN(entityId.Value, requestContent);
|
||||
var verified = await _payPalIPNClient.VerifyIPN(transactionModel.TransactionId, requestContent);
|
||||
|
||||
if (!verified)
|
||||
{
|
||||
|
Reference in New Issue
Block a user