@flopay/react 0.3.15 → 0.3.19

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
@@ -72,6 +72,12 @@ interface FloPayCheckoutProps {
72
72
  onError?: (error: FloPayError) => void;
73
73
  /** Called when a payment is declined or the authentication step fails. */
74
74
  onDecline?: (decline: DeclineEvent) => void;
75
+ /** Called when the full cardholder name input changes. */
76
+ onFullNameChange?: (value: string) => void;
77
+ /** Called when the AVS country dropdown changes. */
78
+ onCountryChange?: (country: string) => void;
79
+ /** Called when the AVS ZIP/postcode input changes. */
80
+ onZipChange?: (zip: string) => void;
75
81
  /** Whether to show the PayPal button (default: true). */
76
82
  showPayPal?: boolean;
77
83
  /** Whether to show Apple Pay button (default: true). Only renders on supported devices. */
@@ -96,10 +102,10 @@ interface FloPayCheckoutProps {
96
102
  */
97
103
  onButtonClick?: (method: CheckoutButtonMethod) => void;
98
104
  /**
99
- * Called before the credit/debit card button continues.
100
- * Card only: this does not run for PayPal or wallet buttons.
105
+ * Called before a payment button continues in `layout="buttons"`.
106
+ * Runs for card, PayPal, Apple Pay, and Google Pay.
101
107
  * In `layout="buttons"` with `createSession`, the returned patch is merged
102
- * into the inline session params before the real card session is created.
108
+ * into the inline session params before the selected flow continues.
103
109
  */
104
110
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => void | false | Promise<void | false | InlineSessionPatch> | InlineSessionPatch;
105
111
  /**
@@ -152,7 +158,7 @@ interface FloPayCheckoutProps {
152
158
  * />
153
159
  * ```
154
160
  */
155
- declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
161
+ declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, onFullNameChange, onCountryChange, onZipChange, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
156
162
 
157
163
  /**
158
164
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -366,6 +372,8 @@ interface SplitCardFormProps {
366
372
  error?: string | null;
367
373
  /** Called when internal error state changes. */
368
374
  onErrorChange?: (error: string | null) => void;
375
+ /** Callback when the full cardholder name input changes. */
376
+ onFullNameChange?: (value: string) => void;
369
377
  /** Callback when first name changes (from the name input). */
370
378
  onFirstNameChange?: (value: string) => void;
371
379
  /** Callback when last name changes (from the name input). */
@@ -409,8 +417,8 @@ interface SplitCardFormProps {
409
417
  */
410
418
  onButtonClick?: (method: CheckoutButtonMethod) => void;
411
419
  /**
412
- * Called before the credit/debit card button continues.
413
- * Card only: this does not run for PayPal or wallet buttons.
420
+ * Called before a payment button continues in `layout="buttons"`.
421
+ * Runs for card, PayPal, Apple Pay, and Google Pay.
414
422
  */
415
423
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => MaybePromise<void | false | InlineSessionPatch>;
416
424
  /**
package/dist/index.d.ts CHANGED
@@ -72,6 +72,12 @@ interface FloPayCheckoutProps {
72
72
  onError?: (error: FloPayError) => void;
73
73
  /** Called when a payment is declined or the authentication step fails. */
74
74
  onDecline?: (decline: DeclineEvent) => void;
75
+ /** Called when the full cardholder name input changes. */
76
+ onFullNameChange?: (value: string) => void;
77
+ /** Called when the AVS country dropdown changes. */
78
+ onCountryChange?: (country: string) => void;
79
+ /** Called when the AVS ZIP/postcode input changes. */
80
+ onZipChange?: (zip: string) => void;
75
81
  /** Whether to show the PayPal button (default: true). */
76
82
  showPayPal?: boolean;
77
83
  /** Whether to show Apple Pay button (default: true). Only renders on supported devices. */
@@ -96,10 +102,10 @@ interface FloPayCheckoutProps {
96
102
  */
97
103
  onButtonClick?: (method: CheckoutButtonMethod) => void;
98
104
  /**
99
- * Called before the credit/debit card button continues.
100
- * Card only: this does not run for PayPal or wallet buttons.
105
+ * Called before a payment button continues in `layout="buttons"`.
106
+ * Runs for card, PayPal, Apple Pay, and Google Pay.
101
107
  * In `layout="buttons"` with `createSession`, the returned patch is merged
102
- * into the inline session params before the real card session is created.
108
+ * into the inline session params before the selected flow continues.
103
109
  */
104
110
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => void | false | Promise<void | false | InlineSessionPatch> | InlineSessionPatch;
105
111
  /**
@@ -152,7 +158,7 @@ interface FloPayCheckoutProps {
152
158
  * />
153
159
  * ```
154
160
  */
155
- declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
161
+ declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, fallbackPublishableKey, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, onFullNameChange, onCountryChange, onZipChange, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
156
162
 
157
163
  /**
158
164
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -366,6 +372,8 @@ interface SplitCardFormProps {
366
372
  error?: string | null;
367
373
  /** Called when internal error state changes. */
368
374
  onErrorChange?: (error: string | null) => void;
375
+ /** Callback when the full cardholder name input changes. */
376
+ onFullNameChange?: (value: string) => void;
369
377
  /** Callback when first name changes (from the name input). */
370
378
  onFirstNameChange?: (value: string) => void;
371
379
  /** Callback when last name changes (from the name input). */
@@ -409,8 +417,8 @@ interface SplitCardFormProps {
409
417
  */
410
418
  onButtonClick?: (method: CheckoutButtonMethod) => void;
411
419
  /**
412
- * Called before the credit/debit card button continues.
413
- * Card only: this does not run for PayPal or wallet buttons.
420
+ * Called before a payment button continues in `layout="buttons"`.
421
+ * Runs for card, PayPal, Apple Pay, and Google Pay.
414
422
  */
415
423
  onBeforeButtonClick?: (event: BeforeButtonClickEvent) => MaybePromise<void | false | InlineSessionPatch>;
416
424
  /**