From aef68d49345236ef09a983cf1236174f546dd30a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 27 Feb 2019 10:16:46 -0500 Subject: [PATCH] support for stripe sources in billing info --- src/Core/Models/Business/BillingInfo.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Core/Models/Business/BillingInfo.cs b/src/Core/Models/Business/BillingInfo.cs index 376960a8b6..efed944d0b 100644 --- a/src/Core/Models/Business/BillingInfo.cs +++ b/src/Core/Models/Business/BillingInfo.cs @@ -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)