@flopay/react 1.2.1 → 1.2.5
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 +9 -1
- package/dist/index.cjs +168 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.mjs +168 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -354,6 +354,7 @@ function CheckoutPage() {
|
|
|
354
354
|
>
|
|
355
355
|
<CheckoutForm
|
|
356
356
|
sessionId="session_uuid"
|
|
357
|
+
nonce={sessionNonce}
|
|
357
358
|
email="user@example.com"
|
|
358
359
|
userId="user_1"
|
|
359
360
|
onComplete={(result) => {
|
|
@@ -374,10 +375,16 @@ function CheckoutPage() {
|
|
|
374
375
|
2. Tokenize card via `createPaymentMethod()` -> `pm_xxx`
|
|
375
376
|
3. Create PaymentIntent via billing API
|
|
376
377
|
4. Confirm card payment (handles 3D Secure)
|
|
377
|
-
5. Submit tokenized body to `POST /v1/checkouts/sessions
|
|
378
|
+
5. Submit tokenized body to `POST /v1/checkouts/sessions/<id>/process`
|
|
378
379
|
6. If backend returns `3ds_required`, re-confirm with new client secret
|
|
379
380
|
7. Resume wallet payments after redirect (PayPal)
|
|
380
381
|
|
|
382
|
+
Pass `nonce` (the session-bound checkout token returned by session creation —
|
|
383
|
+
`CheckoutSessionResult.nonce`, or `session.clientSecret` once the session is
|
|
384
|
+
loaded). The SDK forwards it as `x-checkout-session-token` on every
|
|
385
|
+
continuation call. Post-#640 backends (`TeamFloPay/backend#640`) 401 when the
|
|
386
|
+
header is missing. `FloPayCheckout` already plumbs the prop automatically.
|
|
387
|
+
|
|
381
388
|
### Override Mode (Custom Backend)
|
|
382
389
|
|
|
383
390
|
Pass `onTokenizedBody` to handle backend submission yourself:
|
|
@@ -420,6 +427,7 @@ function CheckoutPage() {
|
|
|
420
427
|
>
|
|
421
428
|
<SplitCardForm
|
|
422
429
|
sessionId="session_uuid"
|
|
430
|
+
nonce={sessionNonce}
|
|
423
431
|
billingApiUrl="https://billing.example.com"
|
|
424
432
|
email="user@example.com"
|
|
425
433
|
userId="user_1"
|