mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 11:04:31 -05:00
assign credit type for account credit
This commit is contained in:
parent
b5782f7b72
commit
b028696891
@ -108,7 +108,7 @@ namespace Bit.Billing.Controllers
|
|||||||
CreationDate = GetTransactionDate(invoice),
|
CreationDate = GetTransactionDate(invoice),
|
||||||
OrganizationId = ids.Item1,
|
OrganizationId = ids.Item1,
|
||||||
UserId = ids.Item2,
|
UserId = ids.Item2,
|
||||||
Type = TransactionType.Charge,
|
Type = TransactionType.Credit,
|
||||||
Gateway = GatewayType.BitPay,
|
Gateway = GatewayType.BitPay,
|
||||||
GatewayId = invoice.Id,
|
GatewayId = invoice.Id,
|
||||||
PaymentMethodType = PaymentMethodType.BitPay,
|
PaymentMethodType = PaymentMethodType.BitPay,
|
||||||
|
@ -226,7 +226,8 @@ namespace Bit.Billing.Controllers
|
|||||||
return new OkResult();
|
return new OkResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ipnTransaction.IsAccountCredit())
|
var isAccountCredit = ipnTransaction.IsAccountCredit();
|
||||||
|
if(!isAccountCredit)
|
||||||
{
|
{
|
||||||
// Only processing credits via IPN for now
|
// Only processing credits via IPN for now
|
||||||
return new OkResult();
|
return new OkResult();
|
||||||
@ -250,7 +251,7 @@ namespace Bit.Billing.Controllers
|
|||||||
CreationDate = ipnTransaction.PaymentDate,
|
CreationDate = ipnTransaction.PaymentDate,
|
||||||
OrganizationId = ids.Item1,
|
OrganizationId = ids.Item1,
|
||||||
UserId = ids.Item2,
|
UserId = ids.Item2,
|
||||||
Type = TransactionType.Charge,
|
Type = isAccountCredit ? TransactionType.Credit : TransactionType.Charge,
|
||||||
Gateway = GatewayType.PayPal,
|
Gateway = GatewayType.PayPal,
|
||||||
GatewayId = ipnTransaction.TxnId,
|
GatewayId = ipnTransaction.TxnId,
|
||||||
PaymentMethodType = PaymentMethodType.PayPal,
|
PaymentMethodType = PaymentMethodType.PayPal,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user