Add standalone Apple Pay button support in Stripe payment form #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for using Apple Pay as a standalone payment option in the Stripe payment form. The implementation includes:
Key changes
New configuration options
The PR introduces new configuration options in PaymentProviderFormOptions.applePayConfig:
priceMacro
: Specifies which price macro to use from the product bundle properties (defaults to "new-price")productMacro
: Specifies which product macro to use for product name from the bundle propertiesproductLabel
: Directly set the product label shown on Apple Pay sheetstaticPrice
: Alternative to using bundle properties - directly set price details:--
currency
: Currency code (e.g., "usd")--
amount
: Price amount in centsrequestPayerName
,requestPayerEmail
,requestPayerPhone
: Configure what information to requestonApplePayAvailable
: Callback function triggered when Apple Pay is availableshowApplePayInPaymentElement
: Control visibility of Apple Pay in the payment element (used with default stripe form)Usage Example