mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
add support for passing payment method type
This commit is contained in:
@ -463,7 +463,7 @@ namespace Bit.Api.Controllers
|
||||
throw new BadRequestException("Invalid license.");
|
||||
}
|
||||
|
||||
await _userService.SignUpPremiumAsync(user, model.PaymentToken,
|
||||
await _userService.SignUpPremiumAsync(user, model.PaymentToken, model.PaymentMethodType,
|
||||
model.AdditionalStorageGb.GetValueOrDefault(0), license);
|
||||
return new ProfileResponseModel(user, null, await _userService.TwoFactorIsEnabledAsync(user));
|
||||
}
|
||||
@ -518,7 +518,7 @@ namespace Bit.Api.Controllers
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
await _userService.ReplacePaymentMethodAsync(user, model.PaymentToken);
|
||||
await _userService.ReplacePaymentMethodAsync(user, model.PaymentToken, model.PaymentMethodType);
|
||||
}
|
||||
|
||||
[HttpPost("storage")]
|
||||
|
@ -209,7 +209,8 @@ namespace Bit.Api.Controllers
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
await _organizationService.ReplacePaymentMethodAsync(orgIdGuid, model.PaymentToken);
|
||||
await _organizationService.ReplacePaymentMethodAsync(orgIdGuid, model.PaymentToken,
|
||||
model.PaymentMethodType);
|
||||
}
|
||||
|
||||
[HttpPost("{id}/upgrade")]
|
||||
|
Reference in New Issue
Block a user