@flopay/react 0.4.0 → 0.4.2

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 CHANGED
@@ -1897,6 +1897,8 @@ function FloPayCheckout({
1897
1897
  onSessionCompleted
1898
1898
  }) {
1899
1899
  const resolvedBillingUrl = (0, import_shared6.resolveBillingApiUrl)(billingApiUrl);
1900
+ const checkoutType = createSessionParams ? "embedded_checkout" : "standard_checkout";
1901
+ const checkoutLayout = children ? "custom_layout" : layout === "buttons" ? "buttons_layout" : "default_layout";
1900
1902
  const [unified, setUnified] = (0, import_react7.useState)(null);
1901
1903
  const [flopay, setFloPay] = (0, import_react7.useState)(null);
1902
1904
  const flopayRef = (0, import_react7.useRef)(null);
@@ -1921,6 +1923,14 @@ function FloPayCheckout({
1921
1923
  onDeclineRef.current = onDecline;
1922
1924
  const onSessionCompletedRef = (0, import_react7.useRef)(onSessionCompleted);
1923
1925
  onSessionCompletedRef.current = onSessionCompleted;
1926
+ (0, import_react7.useEffect)(() => {
1927
+ console.info("[FloPay] Checkout initialized", {
1928
+ sdk_version: import_shared6.SDK_VERSION,
1929
+ checkout_type: checkoutType,
1930
+ checkout_layout: checkoutLayout,
1931
+ billing_api_url: resolvedBillingUrl
1932
+ });
1933
+ }, [checkoutLayout, checkoutType, resolvedBillingUrl]);
1924
1934
  const baseCreateSessionHash = (0, import_react7.useMemo)(
1925
1935
  () => createSessionParams ? hashCreateParams(createSessionParams) : "",
1926
1936
  [createSessionParams]