tf-checkout-react 2.0.0-beta.27 → 2.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -9
- package/docs/API.html +3 -3
- package/docs/API.md +3 -3
- package/docs/GUIDE.html +106 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,22 +7,22 @@ components, plus the shared API and React Query hooks. Which paths a buyer can
|
|
|
7
7
|
actually use depend on the event, the deployed API, the buyer's session and the
|
|
8
8
|
payment provider.
|
|
9
9
|
|
|
10
|
-
This reference describes **2.0.0-beta.
|
|
10
|
+
This reference describes **2.0.0-beta.28**. It is a prerelease with a different
|
|
11
11
|
API from 1.x. Pin the version while evaluating it. npm's `latest` and `beta`
|
|
12
12
|
tags can move independently and an unqualified install may select 1.x:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
npm view tf-checkout-react dist-tags
|
|
16
|
-
npm install tf-checkout-react@2.0.0-beta.
|
|
16
|
+
npm install tf-checkout-react@2.0.0-beta.28 @tanstack/react-query react react-dom
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The [API reference](https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
19
|
+
The [API reference](https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/API.html)
|
|
20
20
|
is included as `docs/API.md` and `docs/API.html` in this package. A
|
|
21
|
-
[standalone guide](https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
21
|
+
[standalone guide](https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/GUIDE.html)
|
|
22
22
|
is also available.
|
|
23
23
|
|
|
24
24
|
If the HTML has not reached the CDN yet, open the packaged `docs/API.md` in a
|
|
25
|
-
Markdown viewer or read the [plain-text API Markdown](https://cdn.jsdelivr.net/npm/tf-checkout-react@2.0.0-beta.
|
|
25
|
+
Markdown viewer or read the [plain-text API Markdown](https://cdn.jsdelivr.net/npm/tf-checkout-react@2.0.0-beta.28/docs/API.md).
|
|
26
26
|
The full guide is also shown on this npm page.
|
|
27
27
|
|
|
28
28
|
## Choose a checkout layout
|
|
@@ -41,6 +41,26 @@ version. The 1.x `*Container` components and named single-page/accordion
|
|
|
41
41
|
examples are not drop-in 2.x exports. The [migration guide](#migrating-from-1x)
|
|
42
42
|
shows how to reproduce those layouts with the current components.
|
|
43
43
|
|
|
44
|
+
### Coming from a 1.x layout?
|
|
45
|
+
|
|
46
|
+
The 1.x guide showed ways to arrange individual containers; those examples were
|
|
47
|
+
not named, ready-made 2.x components. Choose the closest 2.x starting point:
|
|
48
|
+
|
|
49
|
+
| 1.x integration | What to use in beta.28 | What your application owns |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| Separate ticket, billing, payment and confirmation pages | [Step-by-step composition](#step-by-step-checkout) | Routes or step visibility, Back/Edit, and preserving one active checkout provider. |
|
|
52
|
+
| A single page using the container components | [`EmbeddedCheckout`](#embeddedcheckout) for the stock flow, or [single-page composition](#single-page-checkout) to arrange the sections yourself | With composition, the page layout and navigation; with either approach, order-status reconciliation. |
|
|
53
|
+
| The progressive enhancement example | [Step-by-step composition](#step-by-step-checkout) | The visible steps and the rules for moving between them. |
|
|
54
|
+
| The accordion/collapsible example | [Accordion composition](#accordion-checkout) | Disclosure behavior and checkout navigation. |
|
|
55
|
+
| A flow that already reserved a cart | [`ResumedCheckout`](#resume-a-server-cart) | Creating the cart in the same session and the order-status handoff. |
|
|
56
|
+
|
|
57
|
+
The composition examples are starting points, not complete replacements for a
|
|
58
|
+
multi-route checkout. In particular, implement Back/Edit, cart expiry and
|
|
59
|
+
payment recovery before production. See [Compose sections](#compose-sections)
|
|
60
|
+
for the full responsibilities. The 1.x props and callback payloads do not map
|
|
61
|
+
automatically; [Migrating layout callbacks](#migrating-layout-callbacks) gives
|
|
62
|
+
specific examples.
|
|
63
|
+
|
|
44
64
|
[Requirements](#requirements) · [Quick start](#quick-start) ·
|
|
45
65
|
[Configure sessions](#configuration-and-sessions) · [Ready-made checkout](#embeddedcheckout) ·
|
|
46
66
|
[Custom layouts](#compose-sections) · [Payments](#payments) ·
|
|
@@ -683,7 +703,7 @@ error or closed provider page means the charge failed. A custom provider page mu
|
|
|
683
703
|
settle with `{ event: 'dismiss' }` on close/unmount, and other custom payment
|
|
684
704
|
ports must settle, or a waiting reset cannot finish.
|
|
685
705
|
|
|
686
|
-
The beta.
|
|
706
|
+
The beta.28 declaration comments for `reset` and `PAID_ORDER_PENDING_MESSAGE`
|
|
687
707
|
say pressing Pay again finishes an unconfirmed order; the `resetWhenSettled`
|
|
688
708
|
comment also omits retired checkouts as a reason for `false`. Those comments do
|
|
689
709
|
not establish that a retry is safe. Use the session and reconciliation guidance
|
|
@@ -740,7 +760,7 @@ holder's answers in `ticketDataCapture`, and add-on answers via
|
|
|
740
760
|
the opaque catalog ID. Use backend country/state IDs for `countryId` and
|
|
741
761
|
`stateId`; `countryCode` / `stateCode` are payment billing codes.
|
|
742
762
|
|
|
743
|
-
In beta.
|
|
763
|
+
In beta.28 conditional custom-field requiredness is left to the backend and
|
|
744
764
|
not all hosted-checkout conditional visibility is reproduced. Verify the
|
|
745
765
|
actual event against the deployed checkout, including blanks, images, holder
|
|
746
766
|
scoping and validation errors; do not claim parity from the presence of a
|
|
@@ -761,7 +781,7 @@ unknown; `reloadCheckoutDetails()` can also retry the waiver read. A retained
|
|
|
761
781
|
order with a possible payment follows separate recovery and needs reconciliation.
|
|
762
782
|
`WaiverSigning` handles the SDK's signing flow.
|
|
763
783
|
|
|
764
|
-
**Consent limitation in beta.
|
|
784
|
+
**Consent limitation in beta.28:** when `privacyPolicy` is supplied, the
|
|
765
785
|
stock `BillingInfo` replaces the Ticket Fairy marketing checkbox with the
|
|
766
786
|
required privacy checkbox, but both use `consent.ttfOptIn`; the order sends
|
|
767
787
|
that value as `ttf_opt_in`. The privacy acknowledgement and Ticket Fairy
|
|
@@ -1014,6 +1034,52 @@ a full account user. Supply a host sign-in/route callback where applicable.
|
|
|
1014
1034
|
| `PostReaction` | `postId: string \| number`, `onSignIn?`. `PostReactionControls` accepts `flow` and `onSignIn?`. |
|
|
1015
1035
|
| `DiscoveryTravel` | `searchCities`, `searchEvents`, `storage?`, `locale?`. Host supplies search functions; see `DiscoveryTravelProps` for their signatures. |
|
|
1016
1036
|
|
|
1037
|
+
#### Example: ready-made account screens
|
|
1038
|
+
|
|
1039
|
+
The following setup is for an authorized **first-party** full-account
|
|
1040
|
+
integration with the corresponding deployed account routes. In that host's initial
|
|
1041
|
+
[SDK configuration](#configuration-and-sessions), set `accountAuth: true` and
|
|
1042
|
+
`cookieAuth: true`, then complete the approved full-account sign-in and any
|
|
1043
|
+
required proof challenges before mounting them. The checkout-only quick start
|
|
1044
|
+
uses a sign-in path scoped to the event, which is not sufficient. Add the options
|
|
1045
|
+
to the one-time setup; do not reconfigure from this screen.
|
|
1046
|
+
|
|
1047
|
+
The flags do not grant account access or enable backend routes. Third-party
|
|
1048
|
+
integrations need an explicitly approved, supported account journey; contact
|
|
1049
|
+
Ticket Fairy to find out whether one is available. The example assumes the
|
|
1050
|
+
existing `QueryClientProvider` is mounted and the backend supports these screens.
|
|
1051
|
+
The host supplies navigation callbacks. `ProfileSettings` and
|
|
1052
|
+
`NotificationPreferences` receive `signIn`; `AccountRewardsSection` has no
|
|
1053
|
+
sign-in callback and only displays a message while signed out. The host must
|
|
1054
|
+
detect session expiry and offer sign-in separately for rewards.
|
|
1055
|
+
|
|
1056
|
+
```tsx
|
|
1057
|
+
import {
|
|
1058
|
+
AccountRewardsSection, NotificationPreferences, ProfileSettings,
|
|
1059
|
+
} from 'tf-checkout-react'
|
|
1060
|
+
|
|
1061
|
+
export function AccountScreen({ screen, goBack, signIn, browseEvents, viewTickets }: {
|
|
1062
|
+
screen: 'visibility' | 'notifications' | 'rewards'
|
|
1063
|
+
goBack: () => void
|
|
1064
|
+
signIn: () => void
|
|
1065
|
+
browseEvents: () => void
|
|
1066
|
+
viewTickets: () => void
|
|
1067
|
+
}) {
|
|
1068
|
+
if (screen === 'visibility') return (
|
|
1069
|
+
<ProfileSettings mode="visibility" onBack={goBack} onSignIn={signIn} />
|
|
1070
|
+
)
|
|
1071
|
+
if (screen === 'notifications') return (
|
|
1072
|
+
<NotificationPreferences onBack={goBack} onSignIn={signIn} />
|
|
1073
|
+
)
|
|
1074
|
+
return <AccountRewardsSection onBrowseEvents={browseEvents} onViewTickets={viewTickets} />
|
|
1075
|
+
}
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
Use `mode="links"` for profile links. These components do not replace an orders
|
|
1079
|
+
list or establish account authorization. Scope or clear account queries when the
|
|
1080
|
+
buyer signs out or changes, and handle loading, sign-in and navigation in the
|
|
1081
|
+
host as needed.
|
|
1082
|
+
|
|
1017
1083
|
For account orders and ticket lists use `hooks.useOrders`, `hooks.useOrder`,
|
|
1018
1084
|
`ttf.orders.list`, `ttf.orders.get` or `ttf.orders.myTickets`. In this version
|
|
1019
1085
|
`ttf.orders.get` / `useOrder` take a **numeric order ID string**, not a public
|
|
@@ -1248,7 +1314,7 @@ existing 1.x integration pinned until the new flow and backend are verified.
|
|
|
1248
1314
|
There is no automatic translation of old URLs, component props, account
|
|
1249
1315
|
sessions or persisted 1.x state.
|
|
1250
1316
|
|
|
1251
|
-
| 1.x integration | 2.0.0-beta.
|
|
1317
|
+
| 1.x integration | 2.0.0-beta.28 approach |
|
|
1252
1318
|
| --- | --- |
|
|
1253
1319
|
| `setConfigs({ BASE_URL, ... })` | `configureCheckout({ env` or `baseUrl`, `clientId`, `clientSecret: ''`, ... `})`; public client registration and session setup are required. |
|
|
1254
1320
|
| `TicketsContainer`, `SeatMapContainer`, `AddOnsContainer` | `EmbeddedCheckout` or `Tickets`, `SeatMap`, `AddOns` under `CheckoutProvider`. Adapt callbacks and navigation. |
|
package/docs/API.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<main id="main">
|
|
31
31
|
<h1 id="react-checkout-api-reference">React checkout API reference</h1>
|
|
32
32
|
<p>This reference describes the public surface of
|
|
33
|
-
<code>tf-checkout-react</code> version <code>2.0.0-beta.
|
|
33
|
+
<code>tf-checkout-react</code> version <code>2.0.0-beta.28</code>. It
|
|
34
34
|
supplements the package's npm README with examples and an inventory of
|
|
35
35
|
the shared facade and hooks. The package's installed
|
|
36
36
|
<code>dist/index.d.ts</code> is the exact versioned source for complete
|
|
@@ -39,7 +39,7 @@ not establish that the matching backend feature, account permission or
|
|
|
39
39
|
payment provider is enabled.</p>
|
|
40
40
|
<p>For installation, a complete quick start, and examples of the
|
|
41
41
|
ready-made, single-page and step-by-step layouts, start with the <a
|
|
42
|
-
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
42
|
+
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/GUIDE.html#choose-a-checkout-layout">checkout
|
|
43
43
|
guide</a>. This file is the detailed component, engine and API
|
|
44
44
|
reference.</p>
|
|
45
45
|
<p>All examples assume <code>configureCheckout</code> has run, and React
|
|
@@ -450,7 +450,7 @@ confirmer errors should classify only proven no-charge outcomes as
|
|
|
450
450
|
<code>UNSUPPORTED_GATEWAY</code> indicates the necessary platform
|
|
451
451
|
capability is not available, not that every provider failure is safe to
|
|
452
452
|
retry.</p>
|
|
453
|
-
<p>The beta.
|
|
453
|
+
<p>The beta.28 declaration comments for <code>reset</code> and
|
|
454
454
|
<code>PAID_ORDER_PENDING_MESSAGE</code> say pressing Pay again finishes
|
|
455
455
|
an unconfirmed order; the <code>resetWhenSettled</code> comment omits
|
|
456
456
|
retired checkouts as a reason for <code>false</code>. Those comments do
|
package/docs/API.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# React checkout API reference
|
|
2
2
|
|
|
3
3
|
This reference describes the public surface of `tf-checkout-react` version
|
|
4
|
-
`2.0.0-beta.
|
|
4
|
+
`2.0.0-beta.28`. It supplements the package's npm README with examples and an
|
|
5
5
|
inventory of the shared facade and hooks. The package's installed
|
|
6
6
|
`dist/index.d.ts` is the exact versioned source for complete signatures and
|
|
7
7
|
DTO fields. A named export or a typed payment method does not establish that
|
|
8
8
|
the matching backend feature, account permission or payment provider is enabled.
|
|
9
9
|
|
|
10
10
|
For installation, a complete quick start, and examples of the ready-made,
|
|
11
|
-
single-page and step-by-step layouts, start with the [checkout guide](https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
11
|
+
single-page and step-by-step layouts, start with the [checkout guide](https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/GUIDE.html#choose-a-checkout-layout).
|
|
12
12
|
This file is the detailed component, engine and API reference.
|
|
13
13
|
|
|
14
14
|
All examples assume `configureCheckout` has run, and React Query examples are
|
|
@@ -398,7 +398,7 @@ no-charge outcomes as `declined`, `cancelled` or `notStarted`, with `unknown`
|
|
|
398
398
|
for uncertainty. `UNSUPPORTED_GATEWAY` indicates the necessary platform
|
|
399
399
|
capability is not available, not that every provider failure is safe to retry.
|
|
400
400
|
|
|
401
|
-
The beta.
|
|
401
|
+
The beta.28 declaration comments for `reset` and `PAID_ORDER_PENDING_MESSAGE`
|
|
402
402
|
say pressing Pay again finishes an unconfirmed order; the `resetWhenSettled`
|
|
403
403
|
comment omits retired checkouts as a reason for `false`. Those comments do not
|
|
404
404
|
establish that a retry is safe; check the current session and reconcile first.
|
package/docs/GUIDE.html
CHANGED
|
@@ -36,21 +36,21 @@ rewards, ticket-management and account components, plus the shared API
|
|
|
36
36
|
and React Query hooks. Which paths a buyer can actually use depend on
|
|
37
37
|
the event, the deployed API, the buyer's session and the payment
|
|
38
38
|
provider.</p>
|
|
39
|
-
<p>This reference describes <strong>2.0.0-beta.
|
|
39
|
+
<p>This reference describes <strong>2.0.0-beta.28</strong>. It is a
|
|
40
40
|
prerelease with a different API from 1.x. Pin the version while
|
|
41
41
|
evaluating it. npm's <code>latest</code> and <code>beta</code> tags can
|
|
42
42
|
move independently and an unqualified install may select 1.x:</p>
|
|
43
43
|
<pre class="bash"><code>npm view tf-checkout-react dist-tags
|
|
44
|
-
npm install tf-checkout-react@2.0.0-beta.
|
|
44
|
+
npm install tf-checkout-react@2.0.0-beta.28 @tanstack/react-query react react-dom</code></pre>
|
|
45
45
|
<p>The <a
|
|
46
|
-
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
46
|
+
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/API.html">API
|
|
47
47
|
reference</a> is included as <code>docs/API.md</code> and
|
|
48
48
|
<code>docs/API.html</code> in this package. A <a
|
|
49
|
-
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.
|
|
49
|
+
href="https://unpkg.com/tf-checkout-react@2.0.0-beta.28/docs/GUIDE.html">standalone
|
|
50
50
|
guide</a> is also available.</p>
|
|
51
51
|
<p>If the HTML has not reached the CDN yet, open the packaged
|
|
52
52
|
<code>docs/API.md</code> in a Markdown viewer or read the <a
|
|
53
|
-
href="https://cdn.jsdelivr.net/npm/tf-checkout-react@2.0.0-beta.
|
|
53
|
+
href="https://cdn.jsdelivr.net/npm/tf-checkout-react@2.0.0-beta.28/docs/API.md">plain-text
|
|
54
54
|
API Markdown</a>. The full guide is also shown on this npm page.</p>
|
|
55
55
|
<h2 id="choose-a-checkout-layout">Choose a checkout layout</h2>
|
|
56
56
|
<table>
|
|
@@ -106,6 +106,59 @@ the ready-made flows in this version. The 1.x <code>*Container</code>
|
|
|
106
106
|
components and named single-page/accordion examples are not drop-in 2.x
|
|
107
107
|
exports. The <a href="#migrating-from-1x">migration guide</a> shows how
|
|
108
108
|
to reproduce those layouts with the current components.</p>
|
|
109
|
+
<h3 id="coming-from-a-1x-layout">Coming from a 1.x layout?</h3>
|
|
110
|
+
<p>The 1.x guide showed ways to arrange individual containers; those
|
|
111
|
+
examples were not named, ready-made 2.x components. Choose the closest
|
|
112
|
+
2.x starting point:</p>
|
|
113
|
+
<table>
|
|
114
|
+
<thead>
|
|
115
|
+
<tr>
|
|
116
|
+
<th>1.x integration</th>
|
|
117
|
+
<th>What to use in beta.28</th>
|
|
118
|
+
<th>What your application owns</th>
|
|
119
|
+
</tr>
|
|
120
|
+
</thead>
|
|
121
|
+
<tbody>
|
|
122
|
+
<tr>
|
|
123
|
+
<td>Separate ticket, billing, payment and confirmation pages</td>
|
|
124
|
+
<td><a href="#step-by-step-checkout">Step-by-step composition</a></td>
|
|
125
|
+
<td>Routes or step visibility, Back/Edit, and preserving one active
|
|
126
|
+
checkout provider.</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td>A single page using the container components</td>
|
|
130
|
+
<td><a href="#embeddedcheckout"><code>EmbeddedCheckout</code></a> for
|
|
131
|
+
the stock flow, or <a href="#single-page-checkout">single-page
|
|
132
|
+
composition</a> to arrange the sections yourself</td>
|
|
133
|
+
<td>With composition, the page layout and navigation; with either
|
|
134
|
+
approach, order-status reconciliation.</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>The progressive enhancement example</td>
|
|
138
|
+
<td><a href="#step-by-step-checkout">Step-by-step composition</a></td>
|
|
139
|
+
<td>The visible steps and the rules for moving between them.</td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td>The accordion/collapsible example</td>
|
|
143
|
+
<td><a href="#accordion-checkout">Accordion composition</a></td>
|
|
144
|
+
<td>Disclosure behavior and checkout navigation.</td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td>A flow that already reserved a cart</td>
|
|
148
|
+
<td><a
|
|
149
|
+
href="#resume-a-server-cart"><code>ResumedCheckout</code></a></td>
|
|
150
|
+
<td>Creating the cart in the same session and the order-status
|
|
151
|
+
handoff.</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
<p>The composition examples are starting points, not complete
|
|
156
|
+
replacements for a multi-route checkout. In particular, implement
|
|
157
|
+
Back/Edit, cart expiry and payment recovery before production. See <a
|
|
158
|
+
href="#compose-sections">Compose sections</a> for the full
|
|
159
|
+
responsibilities. The 1.x props and callback payloads do not map
|
|
160
|
+
automatically; <a href="#migrating-layout-callbacks">Migrating layout
|
|
161
|
+
callbacks</a> gives specific examples.</p>
|
|
109
162
|
<p><a href="#requirements">Requirements</a> · <a
|
|
110
163
|
href="#quick-start">Quick start</a> · <a
|
|
111
164
|
href="#configuration-and-sessions">Configure sessions</a> · <a
|
|
@@ -919,7 +972,7 @@ not assume a timeout, network error or closed provider page means the
|
|
|
919
972
|
charge failed. A custom provider page must settle with
|
|
920
973
|
<code>{ event: 'dismiss' }</code> on close/unmount, and other custom
|
|
921
974
|
payment ports must settle, or a waiting reset cannot finish.</p>
|
|
922
|
-
<p>The beta.
|
|
975
|
+
<p>The beta.28 declaration comments for <code>reset</code> and
|
|
923
976
|
<code>PAID_ORDER_PENDING_MESSAGE</code> say pressing Pay again finishes
|
|
924
977
|
an unconfirmed order; the <code>resetWhenSettled</code> comment also
|
|
925
978
|
omits retired checkouts as a reason for <code>false</code>. Those
|
|
@@ -986,7 +1039,7 @@ come from the priced cart, not the opaque catalog ID. Use backend
|
|
|
986
1039
|
country/state IDs for <code>countryId</code> and <code>stateId</code>;
|
|
987
1040
|
<code>countryCode</code> / <code>stateCode</code> are payment billing
|
|
988
1041
|
codes.</p>
|
|
989
|
-
<p>In beta.
|
|
1042
|
+
<p>In beta.28 conditional custom-field requiredness is left to the
|
|
990
1043
|
backend and not all hosted-checkout conditional visibility is
|
|
991
1044
|
reproduced. Verify the actual event against the deployed checkout,
|
|
992
1045
|
including blanks, images, holder scoping and validation errors; do not
|
|
@@ -1009,7 +1062,7 @@ unknown; <code>reloadCheckoutDetails()</code> can also retry the waiver
|
|
|
1009
1062
|
read. A retained order with a possible payment follows separate recovery
|
|
1010
1063
|
and needs reconciliation. <code>WaiverSigning</code> handles the SDK's
|
|
1011
1064
|
signing flow.</p>
|
|
1012
|
-
<p><strong>Consent limitation in beta.
|
|
1065
|
+
<p><strong>Consent limitation in beta.28:</strong> when
|
|
1013
1066
|
<code>privacyPolicy</code> is supplied, the stock
|
|
1014
1067
|
<code>BillingInfo</code> replaces the Ticket Fairy marketing checkbox
|
|
1015
1068
|
with the required privacy checkbox, but both use
|
|
@@ -1489,6 +1542,50 @@ signatures.</td>
|
|
|
1489
1542
|
</tr>
|
|
1490
1543
|
</tbody>
|
|
1491
1544
|
</table>
|
|
1545
|
+
<h4 id="example-ready-made-account-screens">Example: ready-made account
|
|
1546
|
+
screens</h4>
|
|
1547
|
+
<p>The following setup is for an authorized <strong>first-party</strong>
|
|
1548
|
+
full-account integration with the corresponding deployed account routes.
|
|
1549
|
+
In that host's initial <a href="#configuration-and-sessions">SDK
|
|
1550
|
+
configuration</a>, set <code>accountAuth: true</code> and
|
|
1551
|
+
<code>cookieAuth: true</code>, then complete the approved full-account
|
|
1552
|
+
sign-in and any required proof challenges before mounting them. The
|
|
1553
|
+
checkout-only quick start uses a sign-in path scoped to the event, which
|
|
1554
|
+
is not sufficient. Add the options to the one-time setup; do not
|
|
1555
|
+
reconfigure from this screen.</p>
|
|
1556
|
+
<p>The flags do not grant account access or enable backend routes.
|
|
1557
|
+
Third-party integrations need an explicitly approved, supported account
|
|
1558
|
+
journey; contact Ticket Fairy to find out whether one is available. The
|
|
1559
|
+
example assumes the existing <code>QueryClientProvider</code> is mounted
|
|
1560
|
+
and the backend supports these screens. The host supplies navigation
|
|
1561
|
+
callbacks. <code>ProfileSettings</code> and
|
|
1562
|
+
<code>NotificationPreferences</code> receive <code>signIn</code>;
|
|
1563
|
+
<code>AccountRewardsSection</code> has no sign-in callback and only
|
|
1564
|
+
displays a message while signed out. The host must detect session expiry
|
|
1565
|
+
and offer sign-in separately for rewards.</p>
|
|
1566
|
+
<pre class="tsx"><code>import {
|
|
1567
|
+
AccountRewardsSection, NotificationPreferences, ProfileSettings,
|
|
1568
|
+
} from 'tf-checkout-react'
|
|
1569
|
+
|
|
1570
|
+
export function AccountScreen({ screen, goBack, signIn, browseEvents, viewTickets }: {
|
|
1571
|
+
screen: 'visibility' | 'notifications' | 'rewards'
|
|
1572
|
+
goBack: () => void
|
|
1573
|
+
signIn: () => void
|
|
1574
|
+
browseEvents: () => void
|
|
1575
|
+
viewTickets: () => void
|
|
1576
|
+
}) {
|
|
1577
|
+
if (screen === 'visibility') return (
|
|
1578
|
+
<ProfileSettings mode="visibility" onBack={goBack} onSignIn={signIn} />
|
|
1579
|
+
)
|
|
1580
|
+
if (screen === 'notifications') return (
|
|
1581
|
+
<NotificationPreferences onBack={goBack} onSignIn={signIn} />
|
|
1582
|
+
)
|
|
1583
|
+
return <AccountRewardsSection onBrowseEvents={browseEvents} onViewTickets={viewTickets} />
|
|
1584
|
+
}</code></pre>
|
|
1585
|
+
<p>Use <code>mode="links"</code> for profile links. These components do
|
|
1586
|
+
not replace an orders list or establish account authorization. Scope or
|
|
1587
|
+
clear account queries when the buyer signs out or changes, and handle
|
|
1588
|
+
loading, sign-in and navigation in the host as needed.</p>
|
|
1492
1589
|
<p>For account orders and ticket lists use <code>hooks.useOrders</code>,
|
|
1493
1590
|
<code>hooks.useOrder</code>, <code>ttf.orders.list</code>,
|
|
1494
1591
|
<code>ttf.orders.get</code> or <code>ttf.orders.myTickets</code>. In
|
|
@@ -1968,7 +2065,7 @@ props, account sessions or persisted 1.x state.</p>
|
|
|
1968
2065
|
<thead>
|
|
1969
2066
|
<tr>
|
|
1970
2067
|
<th>1.x integration</th>
|
|
1971
|
-
<th>2.0.0-beta.
|
|
2068
|
+
<th>2.0.0-beta.28 approach</th>
|
|
1972
2069
|
</tr>
|
|
1973
2070
|
</thead>
|
|
1974
2071
|
<tbody>
|
package/package.json
CHANGED