Skip to content

Commit

Permalink
Updated customer metadata when updating to use bank account (bitwarde…
Browse files Browse the repository at this point in the history
  • Loading branch information
cturnbull-bitwarden authored and vgrassia committed Nov 21, 2024
1 parent 632193d commit f767722
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,9 @@ private async Task RemoveBraintreeCustomerIdAsync(
{
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
Expand Down

0 comments on commit f767722

Please sign in to comment.