stripe-archive / react-stripe-elements

Moved to stripe/react-stripe-js.
https://github.com/stripe/react-stripe-js
MIT License
3.03k stars 319 forks source link

Add support for extra types of buttons for Apple Pay #552

Closed cgadam closed 3 years ago

cgadam commented 3 years ago

Summary

According to Apple documentation, there's a bunch of buttons types available when using Apple Pay. See them listed here: https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons (specially when using version 4 of Apple Pay we have the ability to use the standard Apple Pay button for enabling subscriptions: "Subscribe with...").

For a list of Apple Pay versions for the Web see: https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_on_the_web_version_history

The button types supported by the PaymentRequestButton is actually very limited: https://stripe.com/docs/stripe-js/elements/payment-request-button#react-styling-the-element

It's actually odd that it does support "Book" and doesn't support "Subscribe" as both seems to be available since version 4 of Apple Pay.

sashko-stripe commented 3 years ago

Sorry for the delay answering this issue! These have since been added: https://stripe.com/docs/js/elements_object/create_element?type=paymentRequestButton