@flopay/react 0.4.7 → 0.4.9
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.cjs +324 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -12
- package/dist/index.d.ts +5 -12
- package/dist/index.mjs +324 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -26,6 +26,8 @@ interface FloPayProviderProps {
|
|
|
26
26
|
currency?: string;
|
|
27
27
|
/** How payment methods are created. 'manual' (default for cards) or 'auto' (needed for PayPal). */
|
|
28
28
|
paymentMethodCreation?: 'manual' | 'auto';
|
|
29
|
+
/** Requests reusable payment credentials for future payments. */
|
|
30
|
+
setupFutureUsage?: 'off_session' | 'on_session';
|
|
29
31
|
/** Billing API base URL. Set once here so child components don't need to repeat it. */
|
|
30
32
|
billingApiUrl?: string;
|
|
31
33
|
};
|
|
@@ -60,15 +62,6 @@ interface FloPayCheckoutProps {
|
|
|
60
62
|
appearance?: FloPayAppearance;
|
|
61
63
|
/** Locale for payment elements (default: 'auto'). */
|
|
62
64
|
locale?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Fallback Stripe publishable key — used only if the session response
|
|
65
|
-
* doesn't include `gatewayData.publishableKey`.
|
|
66
|
-
*
|
|
67
|
-
* When the backend returns full session data (e.g. via `createSession`
|
|
68
|
-
* with `?expand=true`), the response's `gatewayData.publishableKey` is
|
|
69
|
-
* the single source of truth and this prop is not needed.
|
|
70
|
-
*/
|
|
71
|
-
fallbackPublishableKey?: string;
|
|
72
65
|
/** Custom loading UI. Defaults to a simple centered spinner. */
|
|
73
66
|
loading?: React.ReactNode;
|
|
74
67
|
/** Custom error UI. Receives the error. Defaults to showing the error message. */
|
|
@@ -169,7 +162,7 @@ interface FloPayCheckoutProps {
|
|
|
169
162
|
* />
|
|
170
163
|
* ```
|
|
171
164
|
*/
|
|
172
|
-
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale,
|
|
165
|
+
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, onFullNameChange, onCountryChange, onZipChange, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
173
166
|
|
|
174
167
|
/**
|
|
175
168
|
* Returns the current `FloPay` instance, or `null` if the provider
|
|
@@ -538,6 +531,7 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
538
531
|
sessionId?: string;
|
|
539
532
|
createSession?: InlineSessionDraft;
|
|
540
533
|
paymentMethodId?: string;
|
|
534
|
+
checkoutMethod?: CheckoutButtonMethod;
|
|
541
535
|
clientId?: string;
|
|
542
536
|
items?: CheckoutItem[];
|
|
543
537
|
subscriptions?: CheckoutSubscription[];
|
|
@@ -549,7 +543,6 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
549
543
|
utmMetadata?: InlineSessionDraft['utmMetadata'];
|
|
550
544
|
billingApiUrl?: string;
|
|
551
545
|
locale?: string;
|
|
552
|
-
fallbackPublishableKey?: string;
|
|
553
546
|
buttonsTheme?: ButtonsLayoutTheme;
|
|
554
547
|
buttonsStyles?: ButtonsLayoutStyles;
|
|
555
548
|
onSuccess?: (event: FloPayAutomaticPaymentSuccessEvent) => void;
|
|
@@ -557,6 +550,6 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
557
550
|
onDecline?: (decline: DeclineEvent) => void;
|
|
558
551
|
children?: React.ReactNode;
|
|
559
552
|
}
|
|
560
|
-
declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale,
|
|
553
|
+
declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, checkoutMethod, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale, buttonsTheme, buttonsStyles: stylesOverride, onSuccess, onError, onDecline, children, disabled, type, style, ...buttonProps }: FloPayAutomaticPaymentButtonProps): react_jsx_runtime.JSX.Element;
|
|
561
554
|
|
|
562
555
|
export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ interface FloPayProviderProps {
|
|
|
26
26
|
currency?: string;
|
|
27
27
|
/** How payment methods are created. 'manual' (default for cards) or 'auto' (needed for PayPal). */
|
|
28
28
|
paymentMethodCreation?: 'manual' | 'auto';
|
|
29
|
+
/** Requests reusable payment credentials for future payments. */
|
|
30
|
+
setupFutureUsage?: 'off_session' | 'on_session';
|
|
29
31
|
/** Billing API base URL. Set once here so child components don't need to repeat it. */
|
|
30
32
|
billingApiUrl?: string;
|
|
31
33
|
};
|
|
@@ -60,15 +62,6 @@ interface FloPayCheckoutProps {
|
|
|
60
62
|
appearance?: FloPayAppearance;
|
|
61
63
|
/** Locale for payment elements (default: 'auto'). */
|
|
62
64
|
locale?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Fallback Stripe publishable key — used only if the session response
|
|
65
|
-
* doesn't include `gatewayData.publishableKey`.
|
|
66
|
-
*
|
|
67
|
-
* When the backend returns full session data (e.g. via `createSession`
|
|
68
|
-
* with `?expand=true`), the response's `gatewayData.publishableKey` is
|
|
69
|
-
* the single source of truth and this prop is not needed.
|
|
70
|
-
*/
|
|
71
|
-
fallbackPublishableKey?: string;
|
|
72
65
|
/** Custom loading UI. Defaults to a simple centered spinner. */
|
|
73
66
|
loading?: React.ReactNode;
|
|
74
67
|
/** Custom error UI. Receives the error. Defaults to showing the error message. */
|
|
@@ -169,7 +162,7 @@ interface FloPayCheckoutProps {
|
|
|
169
162
|
* />
|
|
170
163
|
* ```
|
|
171
164
|
*/
|
|
172
|
-
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale,
|
|
165
|
+
declare function FloPayCheckout({ sessionId: sessionIdProp, createSession: createSessionParams, billingApiUrl, appearance, locale, loading: loadingNode, error: errorNode, onComplete, onError, onDecline, onFullNameChange, onCountryChange, onZipChange, showPayPal, showApplePay, showGooglePay, layout, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, avsLayout, submitLabel, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
|
|
173
166
|
|
|
174
167
|
/**
|
|
175
168
|
* Returns the current `FloPay` instance, or `null` if the provider
|
|
@@ -538,6 +531,7 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
538
531
|
sessionId?: string;
|
|
539
532
|
createSession?: InlineSessionDraft;
|
|
540
533
|
paymentMethodId?: string;
|
|
534
|
+
checkoutMethod?: CheckoutButtonMethod;
|
|
541
535
|
clientId?: string;
|
|
542
536
|
items?: CheckoutItem[];
|
|
543
537
|
subscriptions?: CheckoutSubscription[];
|
|
@@ -549,7 +543,6 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
549
543
|
utmMetadata?: InlineSessionDraft['utmMetadata'];
|
|
550
544
|
billingApiUrl?: string;
|
|
551
545
|
locale?: string;
|
|
552
|
-
fallbackPublishableKey?: string;
|
|
553
546
|
buttonsTheme?: ButtonsLayoutTheme;
|
|
554
547
|
buttonsStyles?: ButtonsLayoutStyles;
|
|
555
548
|
onSuccess?: (event: FloPayAutomaticPaymentSuccessEvent) => void;
|
|
@@ -557,6 +550,6 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
|
|
|
557
550
|
onDecline?: (decline: DeclineEvent) => void;
|
|
558
551
|
children?: React.ReactNode;
|
|
559
552
|
}
|
|
560
|
-
declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale,
|
|
553
|
+
declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, checkoutMethod, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale, buttonsTheme, buttonsStyles: stylesOverride, onSuccess, onError, onDecline, children, disabled, type, style, ...buttonProps }: FloPayAutomaticPaymentButtonProps): react_jsx_runtime.JSX.Element;
|
|
561
554
|
|
|
562
555
|
export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };
|