@bcc-code/payment-client 1.1.3 → 1.1.4
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/README.md +39 -32
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +155 -134
- package/dist/styles/adyen.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as U, ref as D, computed as w, onMounted as A, onUnmounted as I, watch as E, createElementBlock as v, openBlock as b, createElementVNode as s, createCommentVNode as k, toDisplayString as _ } from "vue";
|
|
2
2
|
const $ = { class: "stripe-elements" }, B = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "elements-loading"
|
|
5
5
|
}, x = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "elements-error"
|
|
8
|
-
},
|
|
8
|
+
}, O = {
|
|
9
9
|
key: 2,
|
|
10
10
|
class: "payment-button-container"
|
|
11
|
-
},
|
|
11
|
+
}, M = ["disabled"], H = /* @__PURE__ */ U({
|
|
12
12
|
__name: "StripePayment",
|
|
13
13
|
props: {
|
|
14
14
|
paymentId: {},
|
|
@@ -24,10 +24,10 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
24
24
|
returnUrl: { default: void 0 }
|
|
25
25
|
},
|
|
26
26
|
emits: ["submit", "success", "error", "ready"],
|
|
27
|
-
setup(h, { expose:
|
|
28
|
-
const e = h, a = m, p =
|
|
27
|
+
setup(h, { expose: P, emit: m }) {
|
|
28
|
+
const e = h, a = m, p = D(), u = D(!0), n = D(!1), c = D("");
|
|
29
29
|
let d = null, f = null, y = null;
|
|
30
|
-
const
|
|
30
|
+
const K = w(() => ({
|
|
31
31
|
EUR: "€",
|
|
32
32
|
USD: "$",
|
|
33
33
|
GBP: "£",
|
|
@@ -38,33 +38,33 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
38
38
|
PLN: "zł",
|
|
39
39
|
CZK: "Kč",
|
|
40
40
|
HUF: "Ft"
|
|
41
|
-
})[e.currency] || e.currency),
|
|
41
|
+
})[e.currency] || e.currency), N = w(() => e.amount.toFixed(2)), o = w(() => {
|
|
42
42
|
if (e.clientData)
|
|
43
43
|
try {
|
|
44
|
-
const
|
|
45
|
-
return
|
|
44
|
+
const r = JSON.parse(e.clientData);
|
|
45
|
+
return r.clientSecret || r.client_secret;
|
|
46
46
|
} catch {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), i = async () => {
|
|
50
50
|
if (!p.value) return;
|
|
51
|
-
let
|
|
52
|
-
if (!
|
|
51
|
+
let r = e.publishableKey;
|
|
52
|
+
if (!r && e.clientData)
|
|
53
53
|
try {
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const l = JSON.parse(e.clientData);
|
|
55
|
+
r = l.publishableKey || l.publishable_key;
|
|
56
56
|
} catch {
|
|
57
57
|
}
|
|
58
|
-
if (!
|
|
59
|
-
|
|
58
|
+
if (!r) {
|
|
59
|
+
c.value = "Publishable key is required", u.value = !1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
try {
|
|
63
|
-
u.value = !0,
|
|
64
|
-
const { loadStripe:
|
|
65
|
-
if (d = await
|
|
63
|
+
u.value = !0, c.value = "";
|
|
64
|
+
const { loadStripe: l } = await import("@stripe/stripe-js");
|
|
65
|
+
if (d = await l(r), !d)
|
|
66
66
|
throw new Error("Failed to load Stripe");
|
|
67
|
-
const t =
|
|
67
|
+
const t = o.value, S = {
|
|
68
68
|
appearance: e.appearance || {
|
|
69
69
|
theme: "stripe",
|
|
70
70
|
variables: {
|
|
@@ -80,7 +80,7 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
80
80
|
loader: e.loader,
|
|
81
81
|
locale: e.locale
|
|
82
82
|
};
|
|
83
|
-
t && (
|
|
83
|
+
t && (S.clientSecret = t), f = d.elements(S), y = f.create("payment", {
|
|
84
84
|
layout: "tabs",
|
|
85
85
|
defaultValues: {
|
|
86
86
|
billingDetails: {
|
|
@@ -91,24 +91,24 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
91
91
|
}
|
|
92
92
|
}), y.mount(p.value), y.on("ready", () => {
|
|
93
93
|
u.value = !1, a("ready");
|
|
94
|
-
}), y.on("change", (
|
|
95
|
-
|
|
94
|
+
}), y.on("change", (R) => {
|
|
95
|
+
R.error ? (c.value = R.error.message, a("error", R.error)) : c.value = "";
|
|
96
96
|
});
|
|
97
|
-
} catch (
|
|
98
|
-
|
|
97
|
+
} catch (l) {
|
|
98
|
+
c.value = l instanceof Error ? l.message : "Failed to initialize payment form", u.value = !1, a("error", l);
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, C = async () => {
|
|
101
101
|
if (!(!d || !y)) {
|
|
102
|
-
n.value = !0,
|
|
102
|
+
n.value = !0, c.value = "";
|
|
103
103
|
try {
|
|
104
|
-
const
|
|
104
|
+
const r = e.returnUrl || `${window.location.origin}/payment/return`, { error: l, paymentIntent: t } = await d.confirmPayment({
|
|
105
105
|
elements: f,
|
|
106
106
|
confirmParams: {
|
|
107
|
-
return_url:
|
|
107
|
+
return_url: r
|
|
108
108
|
},
|
|
109
109
|
redirect: "if_required"
|
|
110
110
|
});
|
|
111
|
-
|
|
111
|
+
l ? (c.value = l.message || "Payment failed", a("error", l)) : t ? t.status === "succeeded" ? a("success", {
|
|
112
112
|
paymentIntent: t,
|
|
113
113
|
status: "succeeded",
|
|
114
114
|
message: "Payment completed successfully!"
|
|
@@ -117,58 +117,58 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
117
117
|
status: "processing",
|
|
118
118
|
message: "Payment is being processed..."
|
|
119
119
|
}) : a("submit", { paymentIntent: t, status: t.status }) : a("submit", y);
|
|
120
|
-
} catch (
|
|
121
|
-
|
|
120
|
+
} catch (r) {
|
|
121
|
+
c.value = r instanceof Error ? r.message : "Payment failed", a("error", r);
|
|
122
122
|
} finally {
|
|
123
123
|
n.value = !1;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, g = () => {
|
|
127
127
|
y && (y.destroy(), y = null), f && (f = null), d && (d = null);
|
|
128
128
|
};
|
|
129
129
|
return A(() => {
|
|
130
|
-
|
|
130
|
+
i();
|
|
131
131
|
}), I(() => {
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
-
|
|
135
|
-
}),
|
|
136
|
-
(e.publishableKey || e.clientData) && (
|
|
137
|
-
}),
|
|
138
|
-
destroyElements:
|
|
139
|
-
}), (
|
|
140
|
-
|
|
132
|
+
g();
|
|
133
|
+
}), E(() => e.currency, () => {
|
|
134
|
+
g(), i();
|
|
135
|
+
}), E([() => e.publishableKey, () => e.clientData], () => {
|
|
136
|
+
(e.publishableKey || e.clientData) && (g(), i());
|
|
137
|
+
}), P({
|
|
138
|
+
destroyElements: g
|
|
139
|
+
}), (r, l) => (b(), v("div", $, [
|
|
140
|
+
s("div", {
|
|
141
141
|
ref_key: "elementsContainer",
|
|
142
142
|
ref: p,
|
|
143
143
|
class: "elements-container"
|
|
144
144
|
}, null, 512),
|
|
145
|
-
u.value ? (b(), v("div", B, [...
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
])])) :
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
u.value ? (b(), v("div", B, [...l[0] || (l[0] = [
|
|
146
|
+
s("div", { class: "loading-spinner" }, null, -1),
|
|
147
|
+
s("p", null, "Loading payment form...", -1)
|
|
148
|
+
])])) : k("", !0),
|
|
149
|
+
c.value ? (b(), v("div", x, [
|
|
150
|
+
l[1] || (l[1] = s("div", { class: "error-icon" }, " ⚠️ ", -1)),
|
|
151
|
+
s("p", null, _(c.value), 1),
|
|
152
|
+
s("button", {
|
|
153
153
|
class: "retry-btn",
|
|
154
|
-
onClick:
|
|
154
|
+
onClick: i
|
|
155
155
|
}, " Retry ")
|
|
156
|
-
])) :
|
|
157
|
-
h.showPayButton && !u.value && !
|
|
158
|
-
|
|
156
|
+
])) : k("", !0),
|
|
157
|
+
h.showPayButton && !u.value && !c.value ? (b(), v("div", O, [
|
|
158
|
+
s("button", {
|
|
159
159
|
disabled: n.value,
|
|
160
160
|
class: "payment-button",
|
|
161
|
-
onClick:
|
|
162
|
-
},
|
|
163
|
-
])) :
|
|
161
|
+
onClick: C
|
|
162
|
+
}, _(n.value ? "Processing..." : `Pay ${K.value}${N.value}`), 9, M)
|
|
163
|
+
])) : k("", !0)
|
|
164
164
|
]));
|
|
165
165
|
}
|
|
166
|
-
}), F = (h,
|
|
166
|
+
}), F = (h, P) => {
|
|
167
167
|
const m = h.__vccOpts || h;
|
|
168
|
-
for (const [e, a] of
|
|
168
|
+
for (const [e, a] of P)
|
|
169
169
|
m[e] = a;
|
|
170
170
|
return m;
|
|
171
|
-
}, ne = /* @__PURE__ */ F(H, [["__scopeId", "data-v-adbdf3c5"]]), z = /* @__PURE__ */
|
|
171
|
+
}, ne = /* @__PURE__ */ F(H, [["__scopeId", "data-v-adbdf3c5"]]), z = /* @__PURE__ */ U({
|
|
172
172
|
__name: "AdyenPayment",
|
|
173
173
|
props: {
|
|
174
174
|
paymentId: {},
|
|
@@ -181,8 +181,8 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
181
181
|
onCancel: { type: Function }
|
|
182
182
|
},
|
|
183
183
|
emits: ["submit", "additionalDetails", "error", "ready", "success"],
|
|
184
|
-
setup(h, { emit:
|
|
185
|
-
const m = h, e =
|
|
184
|
+
setup(h, { emit: P }) {
|
|
185
|
+
const m = h, e = P, a = D(null), p = () => {
|
|
186
186
|
if (!m.clientData)
|
|
187
187
|
return console.error("No clientData provided"), null;
|
|
188
188
|
try {
|
|
@@ -199,7 +199,7 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
199
199
|
return console.error("Failed to parse clientData:", n), null;
|
|
200
200
|
}
|
|
201
201
|
}, u = async () => {
|
|
202
|
-
var
|
|
202
|
+
var c;
|
|
203
203
|
if (!m.clientKey || !a.value) {
|
|
204
204
|
console.error("Initialization failed: Missing clientKey or container.");
|
|
205
205
|
return;
|
|
@@ -210,12 +210,12 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
try {
|
|
213
|
-
const { AdyenCheckout: d, Card: f, ApplePay: y, GooglePay:
|
|
213
|
+
const { AdyenCheckout: d, Card: f, ApplePay: y, GooglePay: K, Klarna: N, Blik: o, Dropin: i } = await import("@adyen/adyen-web"), C = {
|
|
214
214
|
environment: m.environment || "test",
|
|
215
215
|
clientKey: m.clientKey,
|
|
216
216
|
session: n,
|
|
217
|
-
onPaymentCompleted: (t,
|
|
218
|
-
console.info("Payment Completed:", t,
|
|
217
|
+
onPaymentCompleted: (t, S) => {
|
|
218
|
+
console.info("Payment Completed:", t, S), e("submit", t), t.resultCode === "Authorised" || t.resultCode === "Received" ? (console.info("Payment Successful:", t), e("success", {
|
|
219
219
|
status: "succeeded",
|
|
220
220
|
message: "Payment completed successfully",
|
|
221
221
|
resultCode: t.resultCode,
|
|
@@ -233,12 +233,12 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
233
233
|
paymentData: t
|
|
234
234
|
}));
|
|
235
235
|
},
|
|
236
|
-
onError: (t,
|
|
237
|
-
console.error("Adyen Error:", t.name, t.message, t.stack,
|
|
236
|
+
onError: (t, S) => {
|
|
237
|
+
console.error("Adyen Error:", t.name, t.message, t.stack, S), e("error", t);
|
|
238
238
|
}
|
|
239
|
-
},
|
|
239
|
+
}, g = {
|
|
240
240
|
showPayButton: !0,
|
|
241
|
-
paymentMethodComponents: [f, y,
|
|
241
|
+
paymentMethodComponents: [f, y, K, N, o],
|
|
242
242
|
paymentMethodsConfiguration: {
|
|
243
243
|
card: {
|
|
244
244
|
hasHolderName: !0,
|
|
@@ -259,37 +259,37 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
259
259
|
// BLIK configuration for Polish market
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
},
|
|
263
|
-
console.log("Adyen Checkout created:",
|
|
264
|
-
const
|
|
265
|
-
console.log("Adyen Drop-in created with session payment methods"), a.value && (
|
|
262
|
+
}, r = await d(C);
|
|
263
|
+
console.log("Adyen Checkout created:", r), console.log("Available payment methods from session:", (c = r.paymentMethodsResponse) == null ? void 0 : c.paymentMethods);
|
|
264
|
+
const l = new i(r, g);
|
|
265
|
+
console.log("Adyen Drop-in created with session payment methods"), a.value && (l.mount(a.value), console.log("Adyen Drop-in mounted successfully"), e("ready"));
|
|
266
266
|
} catch (d) {
|
|
267
267
|
console.error("Error creating Adyen Drop-in:", d), e("error", d);
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
return A(() => {
|
|
271
271
|
u();
|
|
272
|
-
}),
|
|
272
|
+
}), E(() => m.clientData, () => {
|
|
273
273
|
a.value && (a.value.innerHTML = "", u());
|
|
274
|
-
}), (n,
|
|
274
|
+
}), (n, c) => (b(), v("div", {
|
|
275
275
|
ref_key: "dropinContainer",
|
|
276
276
|
ref: a,
|
|
277
277
|
class: "payment-dropin"
|
|
278
278
|
}, null, 512));
|
|
279
279
|
}
|
|
280
|
-
}), ae = /* @__PURE__ */ F(z, [["__scopeId", "data-v-ef2ec054"]]), L = { class: "delayed-payment" },
|
|
280
|
+
}), ae = /* @__PURE__ */ F(z, [["__scopeId", "data-v-ef2ec054"]]), L = { class: "delayed-payment" }, T = { class: "payment-form" }, j = { class: "amount-display" }, q = { class: "amount-value" }, J = {
|
|
281
281
|
key: 0,
|
|
282
282
|
class: "session-info"
|
|
283
|
-
},
|
|
283
|
+
}, V = {
|
|
284
284
|
key: 0,
|
|
285
285
|
class: "info-row"
|
|
286
|
-
},
|
|
286
|
+
}, G = { class: "value" }, W = {
|
|
287
287
|
key: 1,
|
|
288
288
|
class: "info-row"
|
|
289
|
-
},
|
|
289
|
+
}, X = { class: "value" }, Z = {
|
|
290
290
|
key: 1,
|
|
291
291
|
class: "error-message"
|
|
292
|
-
},
|
|
292
|
+
}, Q = { class: "button-container" }, Y = ["disabled"], ee = /* @__PURE__ */ U({
|
|
293
293
|
__name: "DelayedPayment",
|
|
294
294
|
props: {
|
|
295
295
|
paymentId: { default: void 0 },
|
|
@@ -299,8 +299,8 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
299
299
|
tenantId: { default: void 0 }
|
|
300
300
|
},
|
|
301
301
|
emits: ["submit", "success", "error", "ready"],
|
|
302
|
-
setup(h, { expose:
|
|
303
|
-
const e = h, a = m, p =
|
|
302
|
+
setup(h, { expose: P, emit: m }) {
|
|
303
|
+
const e = h, a = m, p = D(!1), u = D(""), n = D({}), c = w(() => ({
|
|
304
304
|
EUR: "€",
|
|
305
305
|
USD: "$",
|
|
306
306
|
GBP: "£",
|
|
@@ -309,88 +309,109 @@ const $ = { class: "stripe-elements" }, B = {
|
|
|
309
309
|
SEK: "kr",
|
|
310
310
|
DKK: "kr",
|
|
311
311
|
PLN: "zł"
|
|
312
|
-
})[e.currency] || e.currency), d =
|
|
312
|
+
})[e.currency] || e.currency), d = w(() => e.amount.toFixed(2)), f = w(() => n.value.transactionNumber && n.value.confirmationUrl), y = () => {
|
|
313
313
|
if (!e.clientData) {
|
|
314
314
|
console.error("No clientData provided for delayed payment");
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
317
|
try {
|
|
318
|
-
const
|
|
319
|
-
console.log("Parsed delayed payment session data:",
|
|
320
|
-
|
|
321
|
-
merchantReference:
|
|
322
|
-
providerUid:
|
|
323
|
-
paymentId:
|
|
324
|
-
confirmationUrl:
|
|
325
|
-
returnUrl: r.returnUrl
|
|
318
|
+
const o = JSON.parse(e.clientData);
|
|
319
|
+
console.log("Parsed delayed payment session data:", o), n.value = {
|
|
320
|
+
transactionNumber: o.transactionNumber,
|
|
321
|
+
merchantReference: o.merchantReference,
|
|
322
|
+
providerUid: o.providerUid,
|
|
323
|
+
paymentId: o.paymentId,
|
|
324
|
+
confirmationUrl: o.confirmationUrl
|
|
326
325
|
}, a("ready");
|
|
327
|
-
} catch (
|
|
328
|
-
console.error("Failed to parse clientData:",
|
|
326
|
+
} catch (o) {
|
|
327
|
+
console.error("Failed to parse clientData:", o), u.value = "Invalid session data", a("error", o);
|
|
329
328
|
}
|
|
330
|
-
},
|
|
329
|
+
}, K = async () => {
|
|
331
330
|
if (!(!f.value || p.value)) {
|
|
332
331
|
p.value = !0, u.value = "";
|
|
333
332
|
try {
|
|
334
|
-
const
|
|
333
|
+
const o = {
|
|
335
334
|
provider: "delayed-payment",
|
|
336
335
|
amount: e.amount,
|
|
337
336
|
currency: e.currency,
|
|
338
|
-
|
|
337
|
+
transactionNumber: n.value.transactionNumber,
|
|
339
338
|
merchantReference: n.value.merchantReference,
|
|
340
339
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
341
340
|
};
|
|
342
|
-
if (a("submit",
|
|
341
|
+
if (a("submit", o), !n.value.confirmationUrl)
|
|
343
342
|
throw new Error("Confirmation URL not provided");
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
const i = {
|
|
344
|
+
"Content-Type": "application/json",
|
|
345
|
+
Accept: "application/json"
|
|
346
|
+
};
|
|
347
|
+
e.tenantId && (i["X-Tenant-ID"] = e.tenantId);
|
|
348
|
+
const C = await fetch(n.value.confirmationUrl, {
|
|
349
|
+
method: "POST",
|
|
350
|
+
headers: i,
|
|
351
|
+
credentials: "include"
|
|
352
|
+
});
|
|
353
|
+
if (!C.ok) {
|
|
354
|
+
const r = await C.json();
|
|
355
|
+
throw new Error(r.message || "Failed to confirm payment");
|
|
356
|
+
}
|
|
357
|
+
const g = await C.json();
|
|
358
|
+
a("success", {
|
|
359
|
+
status: "succeeded",
|
|
360
|
+
message: g.message,
|
|
361
|
+
paymentId: g.paymentId,
|
|
362
|
+
transactionNumber: n.value.transactionNumber
|
|
363
|
+
});
|
|
364
|
+
} catch (o) {
|
|
365
|
+
u.value = o instanceof Error ? o.message : "Failed to confirm payment", a("error", o);
|
|
366
|
+
} finally {
|
|
367
|
+
p.value = !1;
|
|
347
368
|
}
|
|
348
369
|
}
|
|
349
|
-
},
|
|
370
|
+
}, N = () => {
|
|
350
371
|
u.value = "";
|
|
351
372
|
};
|
|
352
373
|
return A(() => {
|
|
353
374
|
y();
|
|
354
|
-
}),
|
|
355
|
-
clearError:
|
|
356
|
-
}), (
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
375
|
+
}), P({
|
|
376
|
+
clearError: N
|
|
377
|
+
}), (o, i) => (b(), v("div", L, [
|
|
378
|
+
s("div", T, [
|
|
379
|
+
i[4] || (i[4] = s("div", { class: "info-section" }, [
|
|
380
|
+
s("div", { class: "info-icon" }, " 📄 "),
|
|
381
|
+
s("h3", { class: "info-title" }, " Delayed Payment "),
|
|
382
|
+
s("p", { class: "info-description" }, " Payment will be processed manually via invoice or bank transfer ")
|
|
362
383
|
], -1)),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
384
|
+
s("div", j, [
|
|
385
|
+
i[0] || (i[0] = s("span", { class: "amount-label" }, "Amount to pay:", -1)),
|
|
386
|
+
s("span", q, _(c.value) + _(d.value), 1)
|
|
366
387
|
]),
|
|
367
|
-
f.value ? (b(), v("div",
|
|
368
|
-
n.value.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
])) :
|
|
372
|
-
n.value.merchantReference ? (b(), v("div",
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
])) :
|
|
376
|
-
])) :
|
|
377
|
-
u.value ? (b(), v("div",
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
])) :
|
|
381
|
-
|
|
382
|
-
|
|
388
|
+
f.value ? (b(), v("div", J, [
|
|
389
|
+
n.value.transactionNumber ? (b(), v("div", V, [
|
|
390
|
+
i[1] || (i[1] = s("span", { class: "label" }, "Transaction Number:", -1)),
|
|
391
|
+
s("span", G, _(n.value.transactionNumber), 1)
|
|
392
|
+
])) : k("", !0),
|
|
393
|
+
n.value.merchantReference ? (b(), v("div", W, [
|
|
394
|
+
i[2] || (i[2] = s("span", { class: "label" }, "Reference:", -1)),
|
|
395
|
+
s("span", X, _(n.value.merchantReference), 1)
|
|
396
|
+
])) : k("", !0)
|
|
397
|
+
])) : k("", !0),
|
|
398
|
+
u.value ? (b(), v("div", Z, [
|
|
399
|
+
i[3] || (i[3] = s("div", { class: "error-icon" }, " ⚠️ ", -1)),
|
|
400
|
+
s("p", null, _(u.value), 1)
|
|
401
|
+
])) : k("", !0),
|
|
402
|
+
s("div", Q, [
|
|
403
|
+
s("button", {
|
|
383
404
|
disabled: p.value || !f.value,
|
|
384
405
|
class: "submit-button",
|
|
385
|
-
onClick:
|
|
386
|
-
},
|
|
406
|
+
onClick: K
|
|
407
|
+
}, _(p.value ? "Processing..." : `Confirm Payment ${c.value}${d.value}`), 9, Y)
|
|
387
408
|
])
|
|
388
409
|
])
|
|
389
410
|
]));
|
|
390
411
|
}
|
|
391
|
-
}),
|
|
412
|
+
}), se = /* @__PURE__ */ F(ee, [["__scopeId", "data-v-ebc5d9c9"]]);
|
|
392
413
|
export {
|
|
393
414
|
ae as AdyenPayment,
|
|
394
|
-
|
|
415
|
+
se as DelayedPayment,
|
|
395
416
|
ne as StripePayment
|
|
396
417
|
};
|