Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v25] Adds async APIs to STPApplePayContext, ApplePayConfiguration #4613

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuki-stripe
Copy link
Collaborator

@yuki-stripe yuki-stripe commented Mar 1, 2025

@yuki-stripe yuki-stripe requested review from a team as code owners March 1, 2025 00:34
@yuki-stripe yuki-stripe force-pushed the yuki/v25-applepaycontext-async branch from f8a5736 to 7267b75 Compare March 1, 2025 19:14
@yuki-stripe yuki-stripe changed the title [Breaking] Adds async APIs to STPApplePayContext. [Breaking] Adds async APIs to STPApplePayContext, ApplePayConfiguration Mar 1, 2025
@yuki-stripe yuki-stripe force-pushed the yuki/v25-applepaycontext-async branch from 7267b75 to 7ed275e Compare March 1, 2025 19:31
@stripe stripe deleted a comment from github-actions bot Mar 1, 2025
Copy link

github-actions bot commented Mar 1, 2025

⚠️ Public API changes detected:

StripePaymentSheet

- public let authorizationResultHandler: ((PassKit.PKPaymentAuthorizationResult, @escaping ((PassKit.PKPaymentAuthorizationResult) -> Swift.Void)) -> Swift.Void)?
- public init(paymentRequestHandler: ((PassKit.PKPaymentRequest) -> PassKit.PKPaymentRequest)? = nil, authorizationResultHandler: ((PassKit.PKPaymentAuthorizationResult, @escaping ((PassKit.PKPaymentAuthorizationResult) -> Swift.Void)) -> Swift.Void)? = nil)
- public let authorizationResultHandler: StripePaymentSheet.PaymentSheet.ApplePayConfiguration.Handlers.AuthorizationResultHandler?
+ #if compiler(>=5.3) && $AsyncAwait
- public typealias AuthorizationResultHandler = (_ result: PassKit.PKPaymentAuthorizationResult) async -> PassKit.PKPaymentAuthorizationResult
+ #endif
+ #if compiler(>=5.3) && $AsyncAwait
- public init(paymentRequestHandler: ((PassKit.PKPaymentRequest) -> PassKit.PKPaymentRequest)? = nil, authorizationResultHandler: StripePaymentSheet.PaymentSheet.ApplePayConfiguration.Handlers.AuthorizationResultHandler? = nil)
+ #endif

StripeApplePay

- func applePayContext(_ context: StripeApplePay.STPApplePayContext, didCreatePaymentMethod paymentMethod: StripeCore.StripeAPI.PaymentMethod, paymentInformation: PassKit.PKPayment, completion: @escaping StripeApplePay.STPIntentClientSecretCompletionBlock)
+ #if compiler(>=5.3) && $AsyncAwait
+ func applePayContext(_ context: StripeApplePay.STPApplePayContext, didCreatePaymentMethod paymentMethod: StripeCore.StripeAPI.PaymentMethod, paymentInformation: PassKit.PKPayment) async throws -> Swift.String
+ #endif

If you are adding a new public API consider the following:

  • Do these APIs need to be public or can they be protected with @_spi(STP)?
  • If these APIs need to be public, assess whether they require an API review.

If you are modifying or removing a public API:

  • Does this require a breaking version change?
  • Do these changes require API review?

If you confirm these APIs need to be added/updated and have undergone necessary review, add the label modifies public API to this PR to acknowledge and bypass this check.

ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with master.

@yuki-stripe yuki-stripe force-pushed the yuki/v25-applepaycontext-async branch from 7ed275e to bb51f75 Compare March 1, 2025 19:51
@yuki-stripe yuki-stripe force-pushed the yuki/v25-applepaycontext-async branch from bb51f75 to b900d96 Compare March 1, 2025 20:20
@yuki-stripe yuki-stripe changed the title [Breaking] Adds async APIs to STPApplePayContext, ApplePayConfiguration [v25] Adds async APIs to STPApplePayContext, ApplePayConfiguration Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant