Use TruvOrder to embed an Order, a multi-connection verification workflow that supports multiple data sources and product types.
import { FC } from 'react';import { StyleSheet, View } from 'react-native';import { TruvOrder, TruvEventPayload, TruvOrderEventPayload } from '@truv/react-native';const OrderScreen: FC<{ bridgeToken: string }> = ({ bridgeToken }) => { return ( <TruvOrder bridgeToken={bridgeToken} style={styles.order} onOrderEvent={(payload: TruvOrderEventPayload) => { switch (payload.eventType) { case "LOAD": // Order page finished loading break; case "CLOSE": // User closed the Order break; case "SUCCESS": // A task within the Order completed successfully. // The Order is still open at this point — it may show // a success screen or a self-certification screen // depending on the configuration. break; case "COMPLETED": // The entire Order is complete (all tasks finished) break; } }} onWidgetEvent={(payload: TruvEventPayload) => { // Fired when the user interacts with the Bridge for a // sub-order (task) within the Order. // Equivalent to TruvBridge onEvent. }} /> );};const styles = StyleSheet.create({ order: { flex: 1 },});