mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Removed the need to verify requests as CloudOps added an ACL on the network (#3882)
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
using System.Text;
|
||||
using Bit.Billing.Models;
|
||||
using Bit.Billing.Services;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Repositories;
|
||||
@ -20,7 +19,6 @@ public class PayPalController : Controller
|
||||
private readonly IMailService _mailService;
|
||||
private readonly IOrganizationRepository _organizationRepository;
|
||||
private readonly IPaymentService _paymentService;
|
||||
private readonly IPayPalIPNClient _payPalIPNClient;
|
||||
private readonly ITransactionRepository _transactionRepository;
|
||||
private readonly IUserRepository _userRepository;
|
||||
|
||||
@ -30,7 +28,6 @@ public class PayPalController : Controller
|
||||
IMailService mailService,
|
||||
IOrganizationRepository organizationRepository,
|
||||
IPaymentService paymentService,
|
||||
IPayPalIPNClient payPalIPNClient,
|
||||
ITransactionRepository transactionRepository,
|
||||
IUserRepository userRepository)
|
||||
{
|
||||
@ -39,7 +36,6 @@ public class PayPalController : Controller
|
||||
_mailService = mailService;
|
||||
_organizationRepository = organizationRepository;
|
||||
_paymentService = paymentService;
|
||||
_payPalIPNClient = payPalIPNClient;
|
||||
_transactionRepository = transactionRepository;
|
||||
_userRepository = userRepository;
|
||||
}
|
||||
@ -91,14 +87,6 @@ public class PayPalController : Controller
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
var verified = await _payPalIPNClient.VerifyIPN(transactionModel.TransactionId, requestContent);
|
||||
|
||||
if (!verified)
|
||||
{
|
||||
_logger.LogError("PayPal IPN ({Id}): Verification failed", transactionModel.TransactionId);
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if (transactionModel.TransactionType != "web_accept" &&
|
||||
transactionModel.TransactionType != "merch_pmt" &&
|
||||
transactionModel.PaymentStatus != "Refunded")
|
||||
|
Reference in New Issue
Block a user