1
0
mirror of https://github.com/bitwarden/server synced 2025-12-17 16:53:23 +00:00

add support for passing payment method type

This commit is contained in:
Kyle Spearrin
2019-02-19 17:13:21 -05:00
parent de85dbc67c
commit a9336a0e02
12 changed files with 91 additions and 55 deletions

View File

@@ -171,6 +171,11 @@ namespace Bit.Core.Services
var stripePaymentMethod = paymentMethodType == PaymentMethodType.Card ||
paymentMethodType == PaymentMethodType.BankAccount;
if(paymentMethodType == PaymentMethodType.BankAccount)
{
throw new GatewayException("Bank account payment method is not supported at this time.");
}
if(user.Gateway == GatewayType.Stripe && !string.IsNullOrWhiteSpace(user.GatewayCustomerId))
{
try