@flopay/react 1.9.14 → 1.9.16
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 +35 -1
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +8 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -109,7 +109,9 @@ Use `onInstrument` on `FloPayCheckout` or `FloPayProvider` to forward a stable,
|
|
|
109
109
|
privacy-safe checkout funnel to your own analytics. The callback receives the
|
|
110
110
|
exported `FloInstrumentEvent` discriminated union; `schemaVersion` is always `1`,
|
|
111
111
|
and `gateway` is included as `stripe` or `paypal` only when the event is
|
|
112
|
-
attributable to that payment provider. Hosted-vault events may omit `gateway
|
|
112
|
+
attributable to that payment provider. Hosted-vault events may omit `gateway`,
|
|
113
|
+
and `card_expanded` always does when the session can route cards to a
|
|
114
|
+
[server-side card gateway](#server-side-card-gateways-worldpay).
|
|
113
115
|
|
|
114
116
|
```tsx
|
|
115
117
|
import type { FloInstrumentEvent } from '@flopay/react';
|
|
@@ -205,6 +207,38 @@ its wording, for example with the amount the buyer is about to pay:
|
|
|
205
207
|
The SDK sends the label only to that exact origin, bound to the checkout
|
|
206
208
|
session. Against an older backend the hosted form keeps its default.
|
|
207
209
|
|
|
210
|
+
#### Server-side card gateways (Worldpay)
|
|
211
|
+
|
|
212
|
+
The billing API can route a checkout's cards to an approved Worldpay Corporate
|
|
213
|
+
Gateway (TeamFloPay/backend#1563). It processes those payments entirely
|
|
214
|
+
server-side behind the same hosted vault card form, so your checkout code does
|
|
215
|
+
not change and never needs to know which gateway took the card:
|
|
216
|
+
|
|
217
|
+
- **No opt-in.** The billing API decides from the merchant's configured
|
|
218
|
+
gateways whether a session can use Worldpay (TeamFloPay/backend#1641). The
|
|
219
|
+
SDK sends no capability token or gateway hint, so routing is the same for
|
|
220
|
+
every SDK version and create style. Auto, Confirm, and pre-tokenized
|
|
221
|
+
sessions stay on the released routing because the billing API keeps them
|
|
222
|
+
there, not because the SDK asks.
|
|
223
|
+
- **Same card surface.** `FloPayCheckout` and `SplitCardForm` mount the hosted
|
|
224
|
+
form with no Stripe runtime and no Worldpay browser SDK or credentials. When
|
|
225
|
+
a session read omitted the embedded vault block, an open session that
|
|
226
|
+
advertises `gateways.worldpayCorporateGateway` recovers the form from
|
|
227
|
+
`POST /v1/checkouts/sessions/{id}/vault/capture` instead of failing to mount.
|
|
228
|
+
A completed or authorized session is never offered the card form again.
|
|
229
|
+
- **Same callbacks.** A success reaches `onComplete` as
|
|
230
|
+
`{ status: 'succeeded', checkoutMethod: 'card' }`, and a manual-capture hold
|
|
231
|
+
as `status: 'authorized'` with `paymentId`, `sessionId`, and
|
|
232
|
+
`authorizationExpiresAt`. `paymentIntentId` is omitted for these sessions
|
|
233
|
+
because the processor's order reference is not a Stripe object. A refusal
|
|
234
|
+
reaches `onDecline` with the stable `authorization_declined` code. A payment
|
|
235
|
+
the billing API is still reconciling when the hosted form stops waiting
|
|
236
|
+
reaches `onError`, never `onComplete`; a later session read reports the
|
|
237
|
+
settled status through `onComplete` or `onSessionCompleted`.
|
|
238
|
+
- **Unattributed card funnel.** `card_expanded` omits `gateway` for these
|
|
239
|
+
sessions, because the billing API, not the browser, chooses the card's
|
|
240
|
+
gateway.
|
|
241
|
+
|
|
208
242
|
### Secure saved-card setup
|
|
209
243
|
|
|
210
244
|
Use `FloPayCardSetup` to let a customer add or verify a card without creating a
|