You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`PaymentSheet.ApplePayConfiguration.Handlers` completion-block based `authorizationResultHandler` has been replaced by an async equivalent. You can use the following example to quickly migrate completion-block based code:
3
+
4
+
```
5
+
// Before:
6
+
authorizationResultHandler: { result in
7
+
return await withCheckedThrowingContinuation { continuation in
8
+
let modifiedResult = // ...modify result (details omitted)
9
+
continuation.resume(returning: modifiedResult)
10
+
}
11
+
}
12
+
13
+
// After:
14
+
authorizationResultHandler: { result, completion in
15
+
// ...modify result (details omitted)
16
+
completion(result)
17
+
}
18
+
```
19
+
20
+
#### STPApplePayContext
21
+
ApplePayContextDelegate's `applePayContext:didCreatePaymentMethod:paymentInformation:completion:` has been replaced by an async equivalent. You can use the following example to quickly migrate completion-block based code:
Copy file name to clipboardexpand all lines: Stripe/StripeiOSTests/STPApplePayContextFunctionalTest.swift
+125-10
Original file line number
Diff line number
Diff line change
@@ -360,17 +360,16 @@ class STPApplePayContextFunctionalTest: STPNetworkStubbingTestCase {
360
360
// When the user taps 'Pay', PKPaymentAuthorizationController calls `didAuthorizePayment:completion:`
361
361
// After you call its completion block, it calls `paymentAuthorizationControllerDidFinish:`
362
362
letdidCallAuthorizePaymentCompletion=expectation(description:"ApplePayContext called completion block of paymentAuthorizationController:didAuthorizePayment:completion:")
0 commit comments