1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

assign credit type for account credit

This commit is contained in:
Kyle Spearrin
2019-02-23 20:24:34 -05:00
parent b5782f7b72
commit b028696891
2 changed files with 4 additions and 3 deletions

View File

@ -226,7 +226,8 @@ namespace Bit.Billing.Controllers
return new OkResult();
}
if(!ipnTransaction.IsAccountCredit())
var isAccountCredit = ipnTransaction.IsAccountCredit();
if(!isAccountCredit)
{
// Only processing credits via IPN for now
return new OkResult();
@ -250,7 +251,7 @@ namespace Bit.Billing.Controllers
CreationDate = ipnTransaction.PaymentDate,
OrganizationId = ids.Item1,
UserId = ids.Item2,
Type = TransactionType.Charge,
Type = isAccountCredit ? TransactionType.Credit : TransactionType.Charge,
Gateway = GatewayType.PayPal,
GatewayId = ipnTransaction.TxnId,
PaymentMethodType = PaymentMethodType.PayPal,