@loczer/storefront-sdk 0.165.0 → 0.167.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/dist/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.js +40 -45
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +73 -98
- package/dist/components/DelayedReveal/index.js +1 -1
- package/dist/components/Footer/index.d.ts +2 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +38 -48
- package/dist/components/Header/index.d.ts +2 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -63
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +35 -26
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +2 -2
- package/dist/i18n/en.d.ts +2 -4
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +5 -7
- package/dist/i18n/fr.d.ts +2 -4
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +5 -7
- package/dist/index.d.ts +8 -10
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +171 -179
- package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPaymentPage.js +124 -145
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +186 -174
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
|
@@ -1,154 +1,155 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as f, useRef as j, useEffect as T, useMemo as K } from "react";
|
|
3
3
|
import { toast as G } from "@rpcbase/client";
|
|
4
4
|
import { useParams as J, useNavigate as Q, useSearchParams as V, Link as N } from "@rpcbase/router";
|
|
5
5
|
import { loadStripe as W } from "@stripe/stripe-js";
|
|
6
6
|
import { Elements as Z, useStripe as ee } from "@stripe/react-stripe-js";
|
|
7
|
-
import { AlertTriangle as O, ShieldCheck as te,
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import { apiPost as
|
|
10
|
-
import { ROUTE as
|
|
11
|
-
import { pickBookingSearchParams as
|
|
7
|
+
import { AlertTriangle as O, ShieldCheck as te, CheckCircle2 as re, XCircle as se, CircleDashed as ne, ArrowRight as ae, Loader2 as ce } from "lucide-react";
|
|
8
|
+
import { useTranslation as E } from "react-i18next";
|
|
9
|
+
import { apiPost as ie } from "../lib/apiCall.js";
|
|
10
|
+
import { ROUTE as oe, responseSchema as le } from "../lib/checkoutPaymentSession.js";
|
|
11
|
+
import { pickBookingSearchParams as ue } from "../lib/booking.js";
|
|
12
12
|
import { useStorefrontCart as me } from "../lib/cart.js";
|
|
13
13
|
import { MollieCardFieldsForm as de } from "../components/payment/MollieCardFieldsForm.js";
|
|
14
|
-
import { StripeCardFieldsForm as
|
|
15
|
-
import { Button as
|
|
14
|
+
import { StripeCardFieldsForm as pe } from "../components/payment/StripeCardFieldsForm.js";
|
|
15
|
+
import { Button as S } from "../ui/button.js";
|
|
16
16
|
import { Card as y } from "../ui/card.js";
|
|
17
|
-
const
|
|
17
|
+
const he = {}, _e = () => he?.RB_PUBLIC_STRIPE_PUBLISHABLE_KEY?.trim() ?? "", fe = _e(), ye = 20, xe = 2500, ge = (t, u, a) => {
|
|
18
18
|
try {
|
|
19
|
-
return new Intl.NumberFormat(
|
|
19
|
+
return new Intl.NumberFormat(a, {
|
|
20
20
|
style: "currency",
|
|
21
|
-
currency:
|
|
21
|
+
currency: u.toUpperCase()
|
|
22
22
|
}).format(t / 100);
|
|
23
23
|
} catch {
|
|
24
|
-
return `${(t / 100).toFixed(2)} ${
|
|
24
|
+
return `${(t / 100).toFixed(2)} ${u.toUpperCase()}`;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function ke({
|
|
28
28
|
clientSecret: t,
|
|
29
|
-
onSuccess:
|
|
29
|
+
onSuccess: u
|
|
30
30
|
}) {
|
|
31
|
-
const { t:
|
|
31
|
+
const { t: a } = E(), _ = ee();
|
|
32
32
|
return /* @__PURE__ */ e(
|
|
33
|
-
|
|
33
|
+
pe,
|
|
34
34
|
{
|
|
35
35
|
requireEmail: !1,
|
|
36
|
-
submitLabel:
|
|
37
|
-
submittingLabel:
|
|
36
|
+
submitLabel: a("checkout_payment_authorize_button"),
|
|
37
|
+
submittingLabel: a("checkout_payment_authorizing_button"),
|
|
38
38
|
onSubmit: async ({ paymentMethodId: x }) => {
|
|
39
|
-
if (!
|
|
40
|
-
throw new Error(
|
|
41
|
-
const
|
|
39
|
+
if (!_)
|
|
40
|
+
throw new Error(a("secure_payment_link.errors.stripe_not_ready"));
|
|
41
|
+
const m = await _.confirmCardPayment(
|
|
42
42
|
t,
|
|
43
43
|
{
|
|
44
44
|
payment_method: x
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
if (
|
|
48
|
-
throw new Error(
|
|
49
|
-
const r =
|
|
47
|
+
if (m.error)
|
|
48
|
+
throw new Error(m.error.message ?? a("secure_payment_link.errors.payment_failed"));
|
|
49
|
+
const r = m.paymentIntent?.status;
|
|
50
50
|
if (r !== "succeeded" && r !== "processing" && r !== "requires_capture")
|
|
51
|
-
throw new Error(
|
|
52
|
-
|
|
51
|
+
throw new Error(a("secure_payment_link.errors.payment_failed"));
|
|
52
|
+
u();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const { t } =
|
|
57
|
+
function be() {
|
|
58
|
+
const { t } = E();
|
|
59
59
|
return /* @__PURE__ */ n("div", { className: "flex min-h-48 items-center justify-center gap-2 text-sm text-slate-600", children: [
|
|
60
|
-
/* @__PURE__ */ e(
|
|
60
|
+
/* @__PURE__ */ e(ce, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
|
|
61
61
|
/* @__PURE__ */ e("span", { children: t("secure_payment_link.form.loading_session") })
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const { t, i18n:
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
if (!
|
|
64
|
+
function Be() {
|
|
65
|
+
const { t, i18n: u } = E(), { storeSlug: a } = J(), _ = Q(), { clear: x } = me(), [m] = V(), [r, d] = f(null), [q, g] = f(!0), [I, k] = f(null), [D, X] = f(0), [A, U] = f(0), b = j(!1), l = j(null), p = m.get("checkout_session_id")?.trim() ?? "", $ = new URLSearchParams(m.toString());
|
|
66
|
+
$.delete("checkout_session_id");
|
|
67
|
+
const h = ue($).toString(), v = `/${a ?? ""}/checkout${h ? `?${h}` : ""}`, P = `/${a ?? ""}/checkout/success${h ? `?${h}` : ""}`, R = async (c) => {
|
|
68
|
+
if (!a || !p)
|
|
69
69
|
throw new Error(t("checkout_payment_return_missing_session"));
|
|
70
|
-
const s = await
|
|
71
|
-
|
|
70
|
+
const s = await ie(
|
|
71
|
+
oe,
|
|
72
72
|
{
|
|
73
|
-
storeSlug:
|
|
74
|
-
checkoutSessionId:
|
|
75
|
-
returnSearch:
|
|
76
|
-
cardToken:
|
|
73
|
+
storeSlug: a,
|
|
74
|
+
checkoutSessionId: p,
|
|
75
|
+
returnSearch: h || void 0,
|
|
76
|
+
cardToken: c
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
return le.parse(s);
|
|
80
80
|
}, C = async () => {
|
|
81
|
-
|
|
81
|
+
b.current || (b.current = !0, G.success(t("checkout_success_toast")), await _(P, { replace: !0 }), x());
|
|
82
82
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
if (!
|
|
87
|
-
|
|
83
|
+
T(() => {
|
|
84
|
+
b.current = !1, l.current = null, d(null), g(!0), U(0);
|
|
85
|
+
}, [p]), T(() => {
|
|
86
|
+
if (!a || !p) {
|
|
87
|
+
l.current = null, d(null), k(t("checkout_payment_return_missing_session")), g(!1);
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
let
|
|
91
|
-
|
|
90
|
+
let c = !1;
|
|
91
|
+
const s = l.current === null;
|
|
92
|
+
return g(s), k(null), (async () => {
|
|
92
93
|
try {
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
95
|
-
if (!
|
|
96
|
-
|
|
94
|
+
const i = await R();
|
|
95
|
+
if (c) return;
|
|
96
|
+
if (!i.success) {
|
|
97
|
+
l.current = null, d(null), k(i.message || t("checkout_payment_return_status_error"));
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
(
|
|
102
|
-
} catch (
|
|
103
|
-
if (
|
|
104
|
-
console.error("Failed to fetch checkout payment session",
|
|
100
|
+
l.current = i, d(i);
|
|
101
|
+
const F = i.paymentStatus;
|
|
102
|
+
(F === "authorized" || F === "succeeded") && !b.current && await C();
|
|
103
|
+
} catch (i) {
|
|
104
|
+
if (c) return;
|
|
105
|
+
console.error("Failed to fetch checkout payment session", i), l.current = null, d(null), k(t("checkout_payment_return_status_error"));
|
|
105
106
|
} finally {
|
|
106
|
-
|
|
107
|
+
!c && s && g(!1);
|
|
107
108
|
}
|
|
108
109
|
})(), () => {
|
|
109
|
-
|
|
110
|
+
c = !0;
|
|
110
111
|
};
|
|
111
|
-
}, [
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
},
|
|
112
|
+
}, [p, x, _, h, D, a, P, t]);
|
|
113
|
+
const o = r?.paymentStatus ?? "pending";
|
|
114
|
+
T(() => {
|
|
115
|
+
if (o !== "pending" || r?.providerType === "stripe_connect_oauth" || A >= ye || !r?.payment?.id) return;
|
|
116
|
+
const c = window.setTimeout(() => {
|
|
117
|
+
U((s) => s + 1), X((s) => s + 1);
|
|
118
|
+
}, xe);
|
|
118
119
|
return () => {
|
|
119
|
-
window.clearTimeout(
|
|
120
|
+
window.clearTimeout(c);
|
|
120
121
|
};
|
|
121
|
-
}, [
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
return !
|
|
122
|
+
}, [o, A, r?.payment?.id, r?.providerType]);
|
|
123
|
+
const M = K(() => {
|
|
124
|
+
const c = r?.stripePublishableKey?.trim() || fe;
|
|
125
|
+
return !c || !r?.stripeAccountId ? null : W(c, {
|
|
125
126
|
stripeAccount: r.stripeAccountId
|
|
126
127
|
});
|
|
127
|
-
}, [r?.stripeAccountId, r?.stripePublishableKey]),
|
|
128
|
+
}, [r?.stripeAccountId, r?.stripePublishableKey]), z = K(() => {
|
|
128
129
|
if (r?.clientSecret)
|
|
129
130
|
return {
|
|
130
131
|
clientSecret: r.clientSecret
|
|
131
132
|
};
|
|
132
133
|
}, [r?.clientSecret]);
|
|
133
|
-
if (!
|
|
134
|
+
if (!p)
|
|
134
135
|
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-destructive/25 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
135
136
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
136
137
|
/* @__PURE__ */ e(O, { className: "mt-0.5 h-5 w-5 text-destructive", "aria-hidden": "true" }),
|
|
137
138
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_missing_session") }) })
|
|
138
139
|
] }),
|
|
139
|
-
/* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(S, { variant: "outline", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_back_to_checkout") }) }) })
|
|
140
141
|
] }) }) });
|
|
141
|
-
if (
|
|
142
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ e(
|
|
143
|
-
if (
|
|
142
|
+
if (q && !r)
|
|
143
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ e(be, {}) }) });
|
|
144
|
+
if (I || !r)
|
|
144
145
|
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-destructive/25 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
145
146
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
146
147
|
/* @__PURE__ */ e(O, { className: "mt-0.5 h-5 w-5 text-destructive", "aria-hidden": "true" }),
|
|
147
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-slate-700", children: /* @__PURE__ */ e("span", { children:
|
|
148
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-slate-700", children: /* @__PURE__ */ e("span", { children: I ?? t("checkout_payment_return_status_error") }) })
|
|
148
149
|
] }),
|
|
149
|
-
/* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(
|
|
150
|
+
/* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(S, { variant: "outline", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_back_to_checkout") }) }) })
|
|
150
151
|
] }) }) });
|
|
151
|
-
const B = typeof r.amountMinor == "number" && r.currency ?
|
|
152
|
+
const B = typeof r.amountMinor == "number" && r.currency ? ge(r.amountMinor, r.currency, u.language) : null, w = o === "authorized" || o === "succeeded", L = o === "failed" || o === "cancelled", Y = w ? re : L ? se : ne, H = w ? "text-emerald-600" : L ? "text-destructive" : "text-amber-600";
|
|
152
153
|
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-5xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ n("div", { className: "grid gap-6 lg:grid-cols-[1fr_1fr]", children: [
|
|
153
154
|
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-5", children: [
|
|
154
155
|
/* @__PURE__ */ n("div", { className: "inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700", children: [
|
|
@@ -168,76 +169,54 @@ function Me() {
|
|
|
168
169
|
/* @__PURE__ */ e("dt", { className: "text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_provider") }) }),
|
|
169
170
|
/* @__PURE__ */ e("dd", { className: "font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: t(`secure_payment_link.providers.${r.providerType}`) }) })
|
|
170
171
|
] }) : null
|
|
171
|
-
] })
|
|
172
|
-
h ? /* @__PURE__ */ n("p", { className: "inline-flex items-center gap-2 text-sm text-slate-500", children: [
|
|
173
|
-
/* @__PURE__ */ e(T, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
|
|
174
|
-
/* @__PURE__ */ e("span", { children: t("checkout_payment_return_loading") })
|
|
175
|
-
] }) : null
|
|
172
|
+
] })
|
|
176
173
|
] }) }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
de,
|
|
193
|
-
{
|
|
194
|
-
profileId: r.profileId,
|
|
195
|
-
testmode: r.testmode === !0,
|
|
196
|
-
submitLabel: t("checkout_payment_authorize_button"),
|
|
197
|
-
submittingLabel: t("checkout_payment_authorizing_button"),
|
|
198
|
-
onSubmit: async (a) => {
|
|
199
|
-
const s = await j(a);
|
|
200
|
-
if (!s.success)
|
|
201
|
-
throw new Error(s.message || t("secure_payment_link.errors.payment_failed"));
|
|
202
|
-
if (p(s), s.paymentStatus === "authorized" || s.paymentStatus === "succeeded") {
|
|
203
|
-
await C();
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
if (!s.checkoutUrl)
|
|
207
|
-
throw new Error(s.message || t("secure_payment_link.errors.mollie_missing_url"));
|
|
208
|
-
const w = new URL(s.checkoutUrl, window.location.origin).toString();
|
|
209
|
-
window.location.assign(w);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
) : /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.session_failed") }) })
|
|
213
|
-
] }) : r.providerType === "stripe_connect_oauth" ? h ? /* @__PURE__ */ e(q, {}) : !r.clientSecret || !z || !F ? /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.missing_publishable_key") }) }) : /* @__PURE__ */ e(Z, { stripe: z, options: F, children: /* @__PURE__ */ e(
|
|
214
|
-
ge,
|
|
174
|
+
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: w || L ? /* @__PURE__ */ n("div", { className: "space-y-6 text-center", children: [
|
|
175
|
+
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(Y, { className: `h-6 w-6 ${H}`, "aria-hidden": "true" }) }),
|
|
176
|
+
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
177
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t(`secure_payment_link.success_titles.${o}`) }) }),
|
|
178
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: t(`secure_payment_link.statuses.${o}`) }) })
|
|
179
|
+
] }),
|
|
180
|
+
w ? /* @__PURE__ */ e(N, { to: P, children: /* @__PURE__ */ n(S, { className: "gap-2", children: [
|
|
181
|
+
/* @__PURE__ */ e("span", { children: t("checkout_payment_return_go_to_success") }),
|
|
182
|
+
/* @__PURE__ */ e(ae, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
183
|
+
] }) }) : /* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_retry_checkout") }) }) })
|
|
184
|
+
] }) : r.providerType === "mollie_connect_oauth" ? /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
185
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.mollie.form_title") }) }),
|
|
186
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_hold_form_description") }) }),
|
|
187
|
+
r.profileId ? /* @__PURE__ */ e(
|
|
188
|
+
de,
|
|
215
189
|
{
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
190
|
+
profileId: r.profileId,
|
|
191
|
+
testmode: r.testmode === !0,
|
|
192
|
+
submitLabel: t("checkout_payment_authorize_button"),
|
|
193
|
+
submittingLabel: t("checkout_payment_authorizing_button"),
|
|
194
|
+
onSubmit: async (c) => {
|
|
195
|
+
const s = await R(c);
|
|
196
|
+
if (!s.success)
|
|
197
|
+
throw new Error(s.message || t("secure_payment_link.errors.payment_failed"));
|
|
198
|
+
if (l.current = s, d(s), s.paymentStatus === "authorized" || s.paymentStatus === "succeeded") {
|
|
199
|
+
await C();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (!s.checkoutUrl)
|
|
203
|
+
throw new Error(s.message || t("secure_payment_link.errors.mollie_missing_url"));
|
|
204
|
+
const i = new URL(s.checkoutUrl, window.location.origin).toString();
|
|
205
|
+
window.location.assign(i);
|
|
219
206
|
}
|
|
220
207
|
}
|
|
221
|
-
)
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
U((a) => a + 1);
|
|
229
|
-
},
|
|
230
|
-
disabled: h,
|
|
231
|
-
className: "gap-2",
|
|
232
|
-
children: [
|
|
233
|
-
h ? /* @__PURE__ */ e(T, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : null,
|
|
234
|
-
/* @__PURE__ */ e("span", { children: t("checkout_payment_return_refresh_status") })
|
|
235
|
-
]
|
|
208
|
+
) : /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.session_failed") }) })
|
|
209
|
+
] }) : r.providerType === "stripe_connect_oauth" ? !r.clientSecret || !M || !z ? /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.missing_publishable_key") }) }) : /* @__PURE__ */ e(Z, { stripe: M, options: z, children: /* @__PURE__ */ e(
|
|
210
|
+
ke,
|
|
211
|
+
{
|
|
212
|
+
clientSecret: r.clientSecret,
|
|
213
|
+
onSuccess: () => {
|
|
214
|
+
C();
|
|
236
215
|
}
|
|
237
|
-
|
|
238
|
-
|
|
216
|
+
}
|
|
217
|
+
) }, r.clientSecret) : /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.session_failed") }) }) })
|
|
239
218
|
] }) });
|
|
240
219
|
}
|
|
241
220
|
export {
|
|
242
|
-
|
|
221
|
+
Be as default
|
|
243
222
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA6GA,MAAM,CAAC,OAAO,UAAU,QAAQ,
|
|
1
|
+
{"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA6GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAyqB/B"}
|