@flopay/react 1.8.2 → 1.8.4
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 +23 -3
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +22 -6
- package/dist/index.d.ts +22 -6
- package/dist/index.mjs +8 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -55,6 +55,25 @@ function CheckoutPage() {
|
|
|
55
55
|
|
|
56
56
|
`FloPayCheckout` automatically fetches the session, initializes the correct payment providers, and renders a `SplitCardForm` with the hosted vault card widget plus the session's supported wallets, APMs, and PayPal. Customer data (email, userId, name) is injected from the session.
|
|
57
57
|
|
|
58
|
+
#### Buyer identity collection
|
|
59
|
+
|
|
60
|
+
For inline checkout creation, `createSession.account.userId` remains required,
|
|
61
|
+
but `email`, `firstName`, and `lastName` may be omitted. `FloPayCheckout`
|
|
62
|
+
creates a mountable session shell first, then collects and attaches the missing
|
|
63
|
+
identity before payment can continue:
|
|
64
|
+
|
|
65
|
+
- Hosted card checkout renders a required email field first, above name, AVS,
|
|
66
|
+
and the hosted card widget. Submit stays gated until the email passes the
|
|
67
|
+
shared `isValidEmail()` validator and a name is present.
|
|
68
|
+
- Apple Pay, Google Pay, other Stripe wallets, and PayPal use provider-returned
|
|
69
|
+
email/name automatically when available.
|
|
70
|
+
- A wallet, PayPal, or APM that does not return the missing fields opens a
|
|
71
|
+
required second pane for email/name before the SDK creates an intent or
|
|
72
|
+
processes payment.
|
|
73
|
+
|
|
74
|
+
The SDK never attaches a blank email. The merchant-supplied `userId` is not
|
|
75
|
+
replaced by provider data.
|
|
76
|
+
|
|
58
77
|
#### Merchant instrument feed
|
|
59
78
|
|
|
60
79
|
Use `onInstrument` on `FloPayCheckout` or `FloPayProvider` to forward a stable,
|
|
@@ -386,7 +405,7 @@ the default layout to `"buttons"` keeps the resolved checkout session and its
|
|
|
386
405
|
gateway capabilities, so the **Credit / Debit Card** choice remains available
|
|
387
406
|
without recreating the session.
|
|
388
407
|
|
|
389
|
-
> **Deprecated**: the legacy `buttonsTheme` prop (`'default'` / `'minimal'` / `'rounded'` / `'dark'`) still works but new code should use `theme` so the same value drives both the buttons-layout wrapper and the auto-payment fallback. See [ButtonsLayoutStyles reference](https://
|
|
408
|
+
> **Deprecated**: the legacy `buttonsTheme` prop (`'default'` / `'minimal'` / `'rounded'` / `'dark'`) still works but new code should use `theme` so the same value drives both the buttons-layout wrapper and the auto-payment fallback. See [ButtonsLayoutStyles reference](https://flopay.com/docs/api-reference/react/flopay-checkout#buttonslayoutstyles-reference) for the underlying override fields.
|
|
390
409
|
|
|
391
410
|
#### Button Hooks
|
|
392
411
|
|
|
@@ -443,7 +462,7 @@ Skip the backend API route — create the session directly in the component:
|
|
|
443
462
|
clientId: 'your-client-id',
|
|
444
463
|
currency: 'EUR',
|
|
445
464
|
items: [{ providerItemId: 'product-1', providerItemName: 'Widget', totalAmount: 29.99 }],
|
|
446
|
-
account: { userId: 'user_1', email
|
|
465
|
+
account: { userId: 'user_1' }, // email and name are collected in checkout
|
|
447
466
|
successUrl: '/success',
|
|
448
467
|
cancelUrl: '/cancel',
|
|
449
468
|
}}
|
|
@@ -451,7 +470,8 @@ Skip the backend API route — create the session directly in the component:
|
|
|
451
470
|
/>
|
|
452
471
|
```
|
|
453
472
|
|
|
454
|
-
The component
|
|
473
|
+
The component creates a lightweight shell, renders the form, and claims the
|
|
474
|
+
session after buyer identity is available — zero merchant backend code needed.
|
|
455
475
|
|
|
456
476
|
#### Authorisation-only checkout
|
|
457
477
|
|