mirror of
https://github.com/bitwarden/server.git
synced 2025-01-14 20:31:23 +01:00
handle refund echecks
This commit is contained in:
parent
7d47dac65f
commit
4b6edace09
@ -92,9 +92,15 @@ namespace Bit.Billing.Controllers
|
||||
return new BadRequestResult();
|
||||
}
|
||||
|
||||
if(ipnTransaction.PaymentType == "echeck")
|
||||
if(ipnTransaction.PaymentStatus == "Refunded" && ipnTransaction.ParentTxnId == null)
|
||||
{
|
||||
// Not accepting eChecks
|
||||
// Refunds require parent transaction
|
||||
return new OkResult();
|
||||
}
|
||||
|
||||
if(ipnTransaction.PaymentType == "echeck" && ipnTransaction.PaymentStatus != "Refunded")
|
||||
{
|
||||
// Not accepting eChecks, unless it is a refund
|
||||
_logger.LogWarning("Got an eCheck payment. " + ipnTransaction.TxnId);
|
||||
return new OkResult();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user