1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

Updated customer metadata when updating to use bank account (#5050)

This commit is contained in:
Conner Turnbull
2024-11-20 09:32:53 -05:00
committed by GitHub
parent 5227ee7d90
commit 77cde50ee1

View File

@ -768,8 +768,9 @@ public class SubscriberService(
{
var metadata = customer.Metadata ?? new Dictionary<string, string>();
if (metadata.ContainsKey(BraintreeCustomerIdKey))
if (metadata.TryGetValue(BraintreeCustomerIdKey, out var value))
{
metadata[BraintreeCustomerIdOldKey] = value;
metadata[BraintreeCustomerIdKey] = null;
await stripeAdapter.CustomerUpdateAsync(customer.Id, new CustomerUpdateOptions