Use ephemeralkey instead of id to remove pyament method (#2572)

This commit is contained in:
John Woo 2023-05-16 09:20:18 -07:00 committed by GitHub
parent ff6390e37f
commit 448a24cee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ import UIKit
open func detachPaymentMethod(paymentMethodId: String) async throws { open func detachPaymentMethod(paymentMethodId: String) async throws {
let customerEphemeralKey = try await customerEphemeralKey let customerEphemeralKey = try await customerEphemeralKey
return try await withCheckedThrowingContinuation({ continuation in 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 { if let error = error {
continuation.resume(throwing: error) continuation.resume(throwing: error)
return return