PrimerApplePayScope manages Apple Pay availability, button display, and payment initiation.
Declaration
Properties
| Property | Type | Description |
|---|---|---|
state | AsyncStream<PrimerApplePayState> | Stream of Apple Pay state changes. Use state.isAvailable to check availability. |
Customization
| Property | Type | Description |
|---|---|---|
screen | ((any PrimerApplePayScope) -> any View)? | Full screen replacement |
applePayButton | ((@escaping () -> Void) -> any View)? | Custom Apple Pay button |
Methods
| Method | Description |
|---|---|
submit() | Initiate Apple Pay payment |
PrimerApplePayButton(action:) | Returns the SDK’s Apple Pay button as AnyView |
PrimerApplePayState
| Property | Type | Description |
|---|---|---|
isLoading | Bool | Loading state |
isAvailable | Bool | Device supports Apple Pay |
availabilityError | String? | Reason if unavailable |
buttonStyle | PKPaymentButtonStyle | Current button style |
buttonType | PKPaymentButtonType | Current button type (buy, checkout, etc.) |
cornerRadius | CGFloat | Button corner radius |
See also
Apple Pay integration
Apple Pay integration guide