1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 09:02:48 -05:00

refactor for addtnl. payment service (braintree)

This commit is contained in:
Kyle Spearrin
2017-07-28 12:09:12 -04:00
parent 2dc9c196c4
commit 082b53e133
14 changed files with 928 additions and 351 deletions

View File

@ -74,7 +74,8 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
var billingInfo = await BillingHelpers.GetBillingAsync(organization);
var paymentService = new StripePaymentService();
var billingInfo = await paymentService.GetBillingAsync(organization);
if(billingInfo == null)
{
throw new NotFoundException();
@ -264,10 +265,10 @@ namespace Bit.Api.Controllers
var userId = _userService.GetProperUserId(User);
await _organizationService.ImportAsync(
orgIdGuid,
userId.Value,
orgIdGuid,
userId.Value,
model.Groups.Select(g => g.ToImportedGroup(orgIdGuid)),
model.Users.Where(u => !u.Deleted).Select(u => u.ToImportedOrganizationUser()),
model.Users.Where(u => !u.Deleted).Select(u => u.ToImportedOrganizationUser()),
model.Users.Where(u => u.Deleted).Select(u => u.ExternalId));
}
}