Options
All
  • Public
  • Public/Protected
  • All
Menu

PlatformPayButton Component Props

Hierarchy

  • AccessibilityProps
    • PlatformPayButtonProps

Index

Properties

accessible?: boolean

When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.

accessibilityActions?: readonly Readonly<{ name: AccessibilityActionName; label?: string }>[]

Provides an array of custom actions available for accessibility.

accessibilityLabel?: string

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.

accessibilityRole?: AccessibilityRole

Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.

accessibilityState?: AccessibilityState

Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.

accessibilityHint?: string

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

accessibilityValue?: AccessibilityValue

Represents the current value of a component. It can be a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).

accessibilityComponentType?: "none" | "button" | "radiobutton_checked" | "radiobutton_unchecked"

In some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on.

platform

android

accessibilityLiveRegion?: "none" | "polite" | "assertive"

Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references.

platform

android

importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants"

Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references.

Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.

accessibilityElementsHidden?: boolean

A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader.

platform

ios

accessibilityTraits?: AccessibilityTrait | AccessibilityTrait[]

Accessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits.

platform

ios

accessibilityViewIsModal?: boolean

A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.

platform

ios

accessibilityIgnoresInvertColors?: boolean
type?: ButtonType

Sets the text displayed by the button.

appearance?: ButtonStyle

Sets the coloring of the button.

borderRadius?: number

Sets the border radius of the button.

disabled?: boolean

Set to true to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false.

testID?: string
style?: StyleProp<ViewStyle>

Methods

  • onAccessibilityAction(event: AccessibilityActionEvent): void
  • When accessible is true, the system will try to invoke this function when the user performs an accessibility custom action.

    Parameters

    • event: AccessibilityActionEvent

    Returns void

  • onAccessibilityEscape(): void
  • When accessibile is true, the system will invoke this function when the user performs the escape gesture (scrub with two fingers).

    platform

    ios

    Returns void

  • onAccessibilityTap(): void
  • When accessible is true, the system will try to invoke this function when the user performs accessibility tap gesture.

    platform

    ios

    Returns void

  • onMagicTap(): void
  • When accessible is true, the system will invoke this function when the user performs the magic tap gesture.

    platform

    ios

    Returns void

  • onPress(): void
  • Function called whenever the button is pressed.

    Returns void

  • onShippingMethodSelected(event: { shippingMethod: ShippingMethod }): void
  • This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet. It receives one parameter: an event object with a shippingMethod field. You MUST update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the Apple Pay sheet will hang and the payment flow will automatically cancel.

    Parameters

    Returns void

  • onShippingContactSelected(event: { shippingContact: ShippingContact }): void
  • This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet IF ContactField.PostalAddress was included in the requiredShippingAddressFields array. It receives one parameter: an event object with a shippingContact field. You MUST update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the Apple Pay sheet will hang and the payment flow will automatically cancel.

    Parameters

    Returns void

  • onCouponCodeEntered(event: { couponCode: string }): void
  • This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet. It receives one parameter: an event object with a couponCode field. You MUST update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the Apple Pay sheet will hang and the payment flow will automatically cancel.

    Parameters

    • event: { couponCode: string }
      • couponCode: string

    Returns void

  • setOrderTracking(completion: (orderIdentifier: string, orderTypeIdentifier: string, authenticationToken: string, webServiceUrl: string) => void): void
  • Callback function for setting the order details (retrieved from your server) to give users the ability to track and manage their purchases in Wallet. Stripe calls your implementation after the payment is complete, but before iOS dismisses the Apple Pay sheet. You must call the completion function, or else the Apple Pay sheet will hang.

    Parameters

    • completion: (orderIdentifier: string, orderTypeIdentifier: string, authenticationToken: string, webServiceUrl: string) => void
        • (orderIdentifier: string, orderTypeIdentifier: string, authenticationToken: string, webServiceUrl: string): void
        • Parameters

          • orderIdentifier: string
          • orderTypeIdentifier: string
          • authenticationToken: string
          • webServiceUrl: string

          Returns void

    Returns void

Generated using TypeDoc