1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

change payment methods between stripe and paypal

This commit is contained in:
Kyle Spearrin
2019-01-31 12:11:30 -05:00
parent fca1ee4253
commit 952d624d72
8 changed files with 172 additions and 52 deletions

View File

@ -1,15 +1,18 @@
using Bit.Core.Enums;
using System;
using Bit.Core.Enums;
using Bit.Core.Services;
namespace Bit.Core.Models.Table
{
public interface ISubscriber
{
Guid Id { get; }
GatewayType? Gateway { get; set; }
string GatewayCustomerId { get; set; }
string GatewaySubscriptionId { get; set; }
string BillingEmailAddress();
string BillingName();
string BraintreeCustomerIdPrefix();
IPaymentService GetPaymentService(GlobalSettings globalSettings);
}
}

View File

@ -63,6 +63,11 @@ namespace Bit.Core.Models.Table
return BusinessName;
}
public string BraintreeCustomerIdPrefix()
{
return "o";
}
public long StorageBytesRemaining()
{
if(!MaxStorageGb.HasValue)

View File

@ -58,6 +58,11 @@ namespace Bit.Core.Models.Table
return Name;
}
public string BraintreeCustomerIdPrefix()
{
return "u";
}
public Dictionary<TwoFactorProviderType, TwoFactorProvider> GetTwoFactorProviders()
{
if(string.IsNullOrWhiteSpace(TwoFactorProviders))