Browse Source

check receiver after txn_type

pull/444/head
Kyle Spearrin 7 years ago
parent
commit
e2df614cd5
  1. 12
      src/Billing/Controllers/PayPalController.cs

12
src/Billing/Controllers/PayPalController.cs

@ -193,12 +193,6 @@ namespace Bit.Billing.Controllers @@ -193,12 +193,6 @@ namespace Bit.Billing.Controllers
}
var ipnTransaction = new PayPalIpnClient.IpnTransaction(body);
if(ipnTransaction.ReceiverId != _billingSettings.PayPal.BusinessId)
{
_logger.LogWarning("Receiver was not proper business id. " + ipnTransaction.ReceiverId);
return new BadRequestResult();
}
if(ipnTransaction.TxnType != "web_accept" && ipnTransaction.TxnType != "merch_pmt" &&
ipnTransaction.PaymentStatus != "Refunded")
{
@ -206,6 +200,12 @@ namespace Bit.Billing.Controllers @@ -206,6 +200,12 @@ namespace Bit.Billing.Controllers
return new OkResult();
}
if(ipnTransaction.ReceiverId != _billingSettings.PayPal.BusinessId)
{
_logger.LogWarning("Receiver was not proper business id. " + ipnTransaction.ReceiverId);
return new BadRequestResult();
}
if(ipnTransaction.PaymentType == "echeck")
{
// Not accepting eChecks

Loading…
Cancel
Save