1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-25 03:21:46 +01:00

support for stripe sources in billing info

This commit is contained in:
Kyle Spearrin 2019-02-27 10:16:46 -05:00
parent 25ea96f1bd
commit aef68d4934

View File

@ -36,6 +36,16 @@ namespace Bit.Core.Models.Business
card.ExpYear);
CardBrand = card.Brand;
}
else if(source is Source src && src.Card != null)
{
Type = PaymentMethodType.Card;
Description = $"{src.Card.Brand}, *{src.Card.Last4}, " +
string.Format("{0}/{1}",
string.Concat(src.Card.ExpMonth < 10 ?
"0" : string.Empty, src.Card.ExpMonth),
src.Card.ExpYear);
CardBrand = src.Card.Brand;
}
}
public BillingSource(Braintree.PaymentMethod method)