From 448a24cee16575d0e1c948e958d811a393995682 Mon Sep 17 00:00:00 2001 From: John Woo <99628984+wooj-stripe@users.noreply.github.com> Date: Tue, 16 May 2023 09:20:18 -0700 Subject: [PATCH] Use ephemeralkey instead of id to remove pyament method (#2572) --- .../Source/PaymentSheet/CustomerAdapter/CustomerAdapter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/CustomerAdapter/CustomerAdapter.swift b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/CustomerAdapter/CustomerAdapter.swift index 3e414988ca..884a4e203d 100644 --- a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/CustomerAdapter/CustomerAdapter.swift +++ b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/CustomerAdapter/CustomerAdapter.swift @@ -164,7 +164,7 @@ import UIKit open func detachPaymentMethod(paymentMethodId: String) async throws { let customerEphemeralKey = try await customerEphemeralKey return try await withCheckedThrowingContinuation({ continuation in - apiClient.detachPaymentMethod(paymentMethodId, fromCustomerUsing: customerEphemeralKey.id) { error in + apiClient.detachPaymentMethod(paymentMethodId, fromCustomerUsing: customerEphemeralKey.ephemeralKeySecret) { error in if let error = error { continuation.resume(throwing: error) return