Skip to content

Conversation

@davidme-stripe
Copy link
Collaborator

@davidme-stripe davidme-stripe commented Jul 24, 2025

Summary

When const { paymentIntent, error } = await confirmPlatformPayPayment() is called twice in quick succession (e.g. if the user double taps the button), we'll fail with a "user cancelled" error. This is confusing, so let's instead return a more explicit error.

We'll also adjust the example code so that it tracks whether Apple Pay is in-flight.

Motivation

#1970

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

@davidme-stripe davidme-stripe changed the title Protect against accidental Apple Pay button clicks in the example code Protect against accidental Apple Pay button clicks Jul 24, 2025
@davidme-stripe davidme-stripe marked this pull request as ready for review July 24, 2025 00:38
@davidme-stripe davidme-stripe merged commit 663a217 into master Jul 24, 2025
13 of 14 checks passed
@davidme-stripe davidme-stripe deleted the daivdme/apple-pay-double-click branch July 24, 2025 03:57
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.

3 participants