@flopay/react 1.8.1 → 1.8.3

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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _flopay_shared from '@flopay/shared';
2
- import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, GatewayEnvironment, PayPalProviderObjectType, TokenizedBody, InlineSessionPatch, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
2
+ import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
3
  export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.cjs';
@@ -133,6 +133,10 @@ interface DirectPayPalButtonProps {
133
133
  billingApiUrl: string;
134
134
  /** Buyer email. */
135
135
  email?: string;
136
+ /** Buyer name already attached to the checkout, when available. */
137
+ billingName?: string;
138
+ /** Attaches buyer identity collected from PayPal before checkout continues. */
139
+ onBuyerIdentityReady?: (identity: NonNullable<InlineSessionPatch['account']>) => void | Promise<void>;
136
140
  /** PayPal client identifier (`gateways.paypal.publishableKey`). */
137
141
  clientId: string;
138
142
  /** Gateway environment, drives the sandbox/live SDK script. */
@@ -634,6 +638,11 @@ interface SplitCardFormProps {
634
638
  * Runs for card, PayPal, Apple Pay, and Google Pay.
635
639
  */
636
640
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => MaybePromise<undefined | false | InlineSessionPatch>;
641
+ /**
642
+ * Called after checkout collects a missing buyer email/name. FloPayCheckout
643
+ * uses this to claim an email-less detached session before payment continues.
644
+ */
645
+ onBuyerIdentityReady?: (identity: NonNullable<InlineSessionPatch['account']>) => MaybePromise<void>;
637
646
  /**
638
647
  * Enable AVS (Address Verification).
639
648
  * - `true` — show country + postal code (backward compatible default)
@@ -697,18 +706,25 @@ interface SplitCardFormProps {
697
706
  /** Backing session — forwarded to direct-PayPal so it can populate accountData. */
698
707
  session?: CheckoutSession | null;
699
708
  /**
700
- * True while a **detached** session's background claim is still in flight
701
- * (TeamFloPay/backend#1099).
709
+ * True while a **detached** session's claim is waiting for buyer identity or
710
+ * is still in flight (TeamFloPay/backend#1099).
702
711
  *
703
712
  * The hosted card widget is already mounted and the buyer can fill it in, but
704
713
  * the session has no cart attached yet, so nothing may be submitted: the
705
714
  * billing API rejects process / intent calls on an unclaimed session with
706
715
  * `409 checkout_session_data_attachment_required`, and holds an unclaimed
707
- * vault charge with a retryable `503`. While true, the card submit is gated
708
- * and the non-card surfaces stay hidden; all of them enable together the
709
- * moment the claim lands. `FloPayCheckout` plumbs this prop automatically.
716
+ * vault charge with a retryable `503`. While true, card submit stays gated.
717
+ * Non-card surfaces also stay hidden unless they are needed to collect the
718
+ * missing identity; all payment continuations enable when the claim lands.
719
+ * `FloPayCheckout` plumbs this prop automatically.
710
720
  */
711
721
  dataAttachmentPending?: boolean;
722
+ /**
723
+ * True when the pending detached claim is waiting for this form to collect
724
+ * buyer identity. Non-card collection surfaces remain available, while all
725
+ * payment continuations still await `onBuyerIdentityReady`.
726
+ */
727
+ dataAttachmentRequiresIdentity?: boolean;
712
728
  /**
713
729
  * Enables on-screen diagnostic panels for the PayPal/wallet gating decision
714
730
  * and the `DirectPayPalButton` lifecycle. Intended for debugging in-app
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _flopay_shared from '@flopay/shared';
2
- import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, GatewayEnvironment, PayPalProviderObjectType, TokenizedBody, InlineSessionPatch, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
2
+ import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
3
  export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.js';
@@ -133,6 +133,10 @@ interface DirectPayPalButtonProps {
133
133
  billingApiUrl: string;
134
134
  /** Buyer email. */
135
135
  email?: string;
136
+ /** Buyer name already attached to the checkout, when available. */
137
+ billingName?: string;
138
+ /** Attaches buyer identity collected from PayPal before checkout continues. */
139
+ onBuyerIdentityReady?: (identity: NonNullable<InlineSessionPatch['account']>) => void | Promise<void>;
136
140
  /** PayPal client identifier (`gateways.paypal.publishableKey`). */
137
141
  clientId: string;
138
142
  /** Gateway environment, drives the sandbox/live SDK script. */
@@ -634,6 +638,11 @@ interface SplitCardFormProps {
634
638
  * Runs for card, PayPal, Apple Pay, and Google Pay.
635
639
  */
636
640
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => MaybePromise<undefined | false | InlineSessionPatch>;
641
+ /**
642
+ * Called after checkout collects a missing buyer email/name. FloPayCheckout
643
+ * uses this to claim an email-less detached session before payment continues.
644
+ */
645
+ onBuyerIdentityReady?: (identity: NonNullable<InlineSessionPatch['account']>) => MaybePromise<void>;
637
646
  /**
638
647
  * Enable AVS (Address Verification).
639
648
  * - `true` — show country + postal code (backward compatible default)
@@ -697,18 +706,25 @@ interface SplitCardFormProps {
697
706
  /** Backing session — forwarded to direct-PayPal so it can populate accountData. */
698
707
  session?: CheckoutSession | null;
699
708
  /**
700
- * True while a **detached** session's background claim is still in flight
701
- * (TeamFloPay/backend#1099).
709
+ * True while a **detached** session's claim is waiting for buyer identity or
710
+ * is still in flight (TeamFloPay/backend#1099).
702
711
  *
703
712
  * The hosted card widget is already mounted and the buyer can fill it in, but
704
713
  * the session has no cart attached yet, so nothing may be submitted: the
705
714
  * billing API rejects process / intent calls on an unclaimed session with
706
715
  * `409 checkout_session_data_attachment_required`, and holds an unclaimed
707
- * vault charge with a retryable `503`. While true, the card submit is gated
708
- * and the non-card surfaces stay hidden; all of them enable together the
709
- * moment the claim lands. `FloPayCheckout` plumbs this prop automatically.
716
+ * vault charge with a retryable `503`. While true, card submit stays gated.
717
+ * Non-card surfaces also stay hidden unless they are needed to collect the
718
+ * missing identity; all payment continuations enable when the claim lands.
719
+ * `FloPayCheckout` plumbs this prop automatically.
710
720
  */
711
721
  dataAttachmentPending?: boolean;
722
+ /**
723
+ * True when the pending detached claim is waiting for this form to collect
724
+ * buyer identity. Non-card collection surfaces remain available, while all
725
+ * payment continuations still await `onBuyerIdentityReady`.
726
+ */
727
+ dataAttachmentRequiresIdentity?: boolean;
712
728
  /**
713
729
  * Enables on-screen diagnostic panels for the PayPal/wallet gating decision
714
730
  * and the `DirectPayPalButton` lifecycle. Intended for debugging in-app