@flopay/react 1.4.24 → 1.6.0
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 +16 -2
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.mjs +8 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -715,6 +715,20 @@ Renderer selection is mutually exclusive per session — direct PayPal takes pri
|
|
|
715
715
|
|
|
716
716
|
**PayPal-only sessions:** When the backend advertises only `gateways.paypal` (no `gateways.stripe`), `FloPayCheckout` skips Stripe Elements entirely and renders `<DirectPayPalButton>` as the sole payment surface. Sessions that advertise no supported gateway at all throw a `validation_error` explaining the expected shape.
|
|
717
717
|
|
|
718
|
+
**Flo-owned subscription continuations:** `gateways.paypal.providerObjectType`
|
|
719
|
+
selects the direct PayPal operation. `'order'` loads the PayPal SDK with
|
|
720
|
+
`intent=capture` and invokes `createOrder`, even when the checkout session mode
|
|
721
|
+
is subscription. `'subscription'` preserves the provider-managed
|
|
722
|
+
`intent=subscription` / `createSubscription` flow. `'setup_token'` invokes
|
|
723
|
+
`createVaultSetupToken`; approval submits the returned `vaultSetupToken` to the
|
|
724
|
+
nonce-bound session `/process` route for backend exchange and activation. An
|
|
725
|
+
advertised `'order'`/`'setup_token'` opts the intent request and tokenized
|
|
726
|
+
process body into the `paypal_vaulted` payment-method channel; the intent
|
|
727
|
+
response must match the advertised object type. When the field is absent,
|
|
728
|
+
legacy sessions continue to derive Order versus Subscription from
|
|
729
|
+
`isSubscription` and keep the released `paypal` requests byte-identical. See
|
|
730
|
+
the full [channel-selection and cutover contract](../../docs/PAYPAL_FLO_SUBSCRIPTION_CONTINUATIONS.md).
|
|
731
|
+
|
|
718
732
|
**Direct PayPal initialization recovery:** PayPal's own cross-window bridge owns
|
|
719
733
|
its 10-second `postMessage init()` acknowledgement deadline; FloPay does not
|
|
720
734
|
change that upstream timeout. If the exact acknowledgement timeout is reported,
|
|
@@ -744,7 +758,7 @@ The SDK exposes the relevant pieces in three ways:
|
|
|
744
758
|
|
|
745
759
|
- **`FloPayProvider`** (manual composition): accepts an optional `paypalFlopay` prop used to drive Stripe's PayPal redirect leg. Load a second `FloPay` instance yourself only if you need to render PayPal manually. `usePayPalFloPay()` exposes it to descendants.
|
|
746
760
|
|
|
747
|
-
- **`DirectPayPalButton`** (standalone): can be rendered outside `SplitCardForm` when you only need the PayPal button. Pass `clientId`, `currency`, `environment`, and `isSubscription
|
|
761
|
+
- **`DirectPayPalButton`** (standalone): can be rendered outside `SplitCardForm` when you only need the PayPal button. Pass `clientId`, `currency`, `environment`, `isSubscription`, and the backend-advertised `providerObjectType` when present. `isSubscription` remains the compatibility fallback when the field is absent.
|
|
748
762
|
|
|
749
763
|
- **`PayPalButton`** (standalone): Must be rendered inside its own `FloPayProvider`:
|
|
750
764
|
|
|
@@ -816,7 +830,7 @@ function PaymentStatus() {
|
|
|
816
830
|
| `SplitCardForm` | Advanced checkout surface combining hosted-vault cards with wallets, APMs, and PayPal. Supports `ref` for imperative next-action handling. |
|
|
817
831
|
| `VaultCardFields` | Hosted vault PCI card fields. Used internally by `SplitCardForm` on the vault path; consumes a `CardCaptureAdapter` from `useFloPay().cardCapture()`. |
|
|
818
832
|
| `PayPalButton` | Standalone PayPal button. Requires its own `FloPayProvider` with `paymentMethodCreation` set to something other than `'manual'`. |
|
|
819
|
-
| `DirectPayPalButton` | Standalone direct PayPal
|
|
833
|
+
| `DirectPayPalButton` | Standalone direct PayPal Order, provider-managed Subscription, or setup-token button using the session-scoped intent contract. |
|
|
820
834
|
| `PaymentElement` | Provider element for an explicitly declared non-card `paymentMethodTypes` allowlist. |
|
|
821
835
|
| `AddressElement` | Address input element |
|
|
822
836
|
|