@achyutlabsau/vue-payment-gateway 0.15.2 → 0.17.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/index.d.ts +89 -2
- package/dist/index.js +6 -6
- package/dist/{linkly-D3mav3HW.js → linkly-BVBOUjZX.js} +81 -76
- package/dist/linkly.d.ts +121 -6
- package/dist/linkly.js +1 -1
- package/dist/mx51.d.ts +89 -2
- package/dist/{smartpay-Be3u1f3L.js → smartpay-BHnbLa5i.js} +72 -72
- package/dist/smartpay.d.ts +89 -2
- package/dist/smartpay.js +1 -1
- package/dist/{till-payment-C1iLnYV7.js → till-payment-BlnycpPt.js} +101 -98
- package/dist/till-payment.d.ts +109 -6
- package/dist/till-payment.js +1 -1
- package/dist/tyro.d.ts +89 -2
- package/dist/utils-CAwJtwP_.js +33 -0
- package/dist/{valpay-DVV1AH4F.js → valpay-Co5GhIks.js} +150 -95
- package/dist/valpay.d.ts +208 -11
- package/dist/valpay.js +1 -1
- package/dist/{worldline-CEiMow5_.js → worldline-nQDVuEak.js} +12 -16
- package/dist/worldline.d.ts +108 -7
- package/dist/worldline.js +1 -1
- package/package.json +1 -1
- package/dist/utils-o5X3364V.js +0 -8
package/dist/index.d.ts
CHANGED
|
@@ -1077,7 +1077,8 @@ declare global {
|
|
|
1077
1077
|
cancel(): void;
|
|
1078
1078
|
// TODO:
|
|
1079
1079
|
setTransactionData(trxData: TransactionData): void;
|
|
1080
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1080
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1081
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1081
1082
|
dispose(): void;
|
|
1082
1083
|
getTransactionData(): TransactionData | undefined;
|
|
1083
1084
|
}
|
|
@@ -1108,10 +1109,96 @@ declare global {
|
|
|
1108
1109
|
}
|
|
1109
1110
|
|
|
1110
1111
|
class TransactionData {
|
|
1111
|
-
|
|
1112
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1113
|
+
dccAllowed?: boolean;
|
|
1114
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1115
|
+
trxOriginalDate?: TimeDate;
|
|
1116
|
+
/** ECR sequence counter. */
|
|
1117
|
+
ecrSeqCounter?: number;
|
|
1118
|
+
/** Whether partial approval is allowed. */
|
|
1119
|
+
partialApprovalAllowed?: boolean;
|
|
1120
|
+
/** ECR transaction reference. */
|
|
1121
|
+
transRef?: string;
|
|
1122
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1123
|
+
transSeq?: string;
|
|
1124
|
+
/** Card reference token. */
|
|
1125
|
+
cardRef?: string;
|
|
1126
|
+
/** Acquirer id. */
|
|
1127
|
+
acqId?: number;
|
|
1128
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1129
|
+
acqTransRef?: string;
|
|
1130
|
+
/** Terminal transaction reference. */
|
|
1131
|
+
trmTransRef?: string;
|
|
1132
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1133
|
+
tipAllowed?: boolean;
|
|
1134
|
+
/** Phone authorization code. */
|
|
1135
|
+
phoneAuthCode?: string;
|
|
1136
|
+
/** Cardholder/terminal language. */
|
|
1137
|
+
language?: string;
|
|
1138
|
+
/** Multi-currency flag. */
|
|
1139
|
+
multiCurrencyFlag?: boolean;
|
|
1140
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1141
|
+
ngvMode?: EnumValue;
|
|
1142
|
+
/** NGV clearing delay. */
|
|
1143
|
+
ngvClearingDelay?: number;
|
|
1144
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1145
|
+
cvc2?: string;
|
|
1146
|
+
/** Application expiration date. */
|
|
1147
|
+
appExpirationDate?: TimeDate;
|
|
1148
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1149
|
+
sixTrxRefNum?: string;
|
|
1150
|
+
/** Whether installment payment is allowed. */
|
|
1151
|
+
installmentAllowed?: boolean;
|
|
1152
|
+
/** Deferred authorization indicator. */
|
|
1153
|
+
deferredAuthInd?: boolean;
|
|
1154
|
+
/** Sub-transactions making up this transaction. */
|
|
1155
|
+
subTransactions: SubTransaction[];
|
|
1156
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1157
|
+
allowedAccounts?: EnumValue[];
|
|
1158
|
+
/** Tokenized PAN. */
|
|
1159
|
+
tokenPan?: string;
|
|
1160
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1161
|
+
tokenPanType?: EnumValue;
|
|
1162
|
+
/** Age to verify for age-restricted goods. */
|
|
1163
|
+
ageToCheck?: number;
|
|
1164
|
+
/** Authorization code. */
|
|
1165
|
+
authCode?: string;
|
|
1166
|
+
/** Forced POS entry modes. */
|
|
1167
|
+
forcePosEntryModes?: EnumValue[];
|
|
1168
|
+
/** Allowed application (brand) list. */
|
|
1169
|
+
allowedAppList?: EnumValue[];
|
|
1170
|
+
constructor(copyTrxData?: TransactionData);
|
|
1171
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1172
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1173
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1174
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1175
|
+
toString(): string;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1179
|
+
class SubTransaction {
|
|
1112
1180
|
constructor();
|
|
1113
1181
|
}
|
|
1114
1182
|
|
|
1183
|
+
/** Terminal date/time value used across the API. */
|
|
1184
|
+
class TimeDate {
|
|
1185
|
+
year: number;
|
|
1186
|
+
month: number;
|
|
1187
|
+
day: number;
|
|
1188
|
+
hour: number;
|
|
1189
|
+
minute: number;
|
|
1190
|
+
second: number;
|
|
1191
|
+
constructor();
|
|
1192
|
+
toDate(): Date;
|
|
1193
|
+
toStringRegular(): string;
|
|
1194
|
+
toStringReceiptDate(): string;
|
|
1195
|
+
toStringReceiptTime(): string;
|
|
1196
|
+
toString(): string;
|
|
1197
|
+
static fromDate(date: Date): TimeDate;
|
|
1198
|
+
static fromNow(): TimeDate;
|
|
1199
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1115
1202
|
class LogRecord {
|
|
1116
1203
|
file: string;
|
|
1117
1204
|
level: { name: string; _value: number };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { d as e, f as t, m as n, p as r, s as i } from "./PairInstructions-BxzivULm.js";
|
|
2
2
|
import { i as a, t as o } from "./tyro-CfOu7q7t.js";
|
|
3
3
|
import { f as s, m as c } from "./mx51-Df356gl0.js";
|
|
4
|
-
import { a as l, i as u, r as d } from "./worldline-
|
|
5
|
-
import { n as f } from "./utils-
|
|
6
|
-
import { t as p } from "./linkly-
|
|
7
|
-
import { t as m } from "./smartpay-
|
|
8
|
-
import { t as h } from "./till-payment-
|
|
9
|
-
import { t as g } from "./valpay-
|
|
4
|
+
import { a as l, i as u, r as d } from "./worldline-nQDVuEak.js";
|
|
5
|
+
import { n as f } from "./utils-CAwJtwP_.js";
|
|
6
|
+
import { t as p } from "./linkly-BVBOUjZX.js";
|
|
7
|
+
import { t as m } from "./smartpay-BHnbLa5i.js";
|
|
8
|
+
import { t as h } from "./till-payment-BlnycpPt.js";
|
|
9
|
+
import { t as g } from "./valpay-Co5GhIks.js";
|
|
10
10
|
import { createBlock as _, createCommentVNode as v, createElementBlock as y, defineComponent as b, openBlock as x, unref as S } from "vue";
|
|
11
11
|
import { useEventListener as C, useScriptTag as w } from "@vueuse/core";
|
|
12
12
|
//#region src/plugin/types.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e, h as t, i as n, o as r, r as i, t as a, u as o } from "./PairInstructions-BxzivULm.js";
|
|
2
|
-
import { a as s, i as c, n as l,
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { createBlock as
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import { useLocalStorage as
|
|
2
|
+
import { a as s, i as c, n as l, o as u, r as d, t as f } from "./utils-CAwJtwP_.js";
|
|
3
|
+
import { t as p } from "./utils-BPFf60Ai.js";
|
|
4
|
+
import { t as m } from "./core-BMUVlh-t.js";
|
|
5
|
+
import { createBlock as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, onMounted as ee, openBlock as x, ref as S, renderSlot as C, resolveDirective as te, toDisplayString as ne, unref as w, useModel as re, withCtx as T, withDirectives as E } from "vue";
|
|
6
|
+
import { Dialog as ie, Loading as D, Notify as O, QBtn as k, QCard as A, QCardActions as ae, QCardSection as j, QDialog as M, QForm as N, QIcon as P, QInput as F, QToolbar as oe, QToolbarTitle as se } from "quasar";
|
|
7
|
+
import { useLocalStorage as ce } from "@vueuse/core";
|
|
8
8
|
import { v7 as I } from "uuid";
|
|
9
|
-
import L, { HttpStatusCode as R, isAxiosError as
|
|
9
|
+
import L, { HttpStatusCode as R, isAxiosError as le } from "axios";
|
|
10
10
|
//#region src/library/linkly/linkly.config.ts
|
|
11
11
|
var z = {
|
|
12
12
|
PATHS: {
|
|
@@ -36,7 +36,7 @@ var z = {
|
|
|
36
36
|
BASE: "https://rest.pos.cloud.pceftpos.com/v1/sessions/"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
}, B = { async: !1 }, V = 18e4, H = 2e3, U = 1e3, { PATHS: W, STORAGE_KEYS: G } = z,
|
|
39
|
+
}, B = { async: !1 }, V = 18e4, H = 2e3, U = 1e3, { PATHS: W, STORAGE_KEYS: G } = z, ue = class {
|
|
40
40
|
_api;
|
|
41
41
|
_authApi;
|
|
42
42
|
token = null;
|
|
@@ -63,7 +63,7 @@ var z = {
|
|
|
63
63
|
}
|
|
64
64
|
_getErrorMessage(e, t) {
|
|
65
65
|
let n = t ?? "An unexpected error occurred.";
|
|
66
|
-
if (
|
|
66
|
+
if (le(e)) {
|
|
67
67
|
let t = e.response?.status;
|
|
68
68
|
switch (t) {
|
|
69
69
|
case R.Unauthorized:
|
|
@@ -77,7 +77,7 @@ var z = {
|
|
|
77
77
|
break;
|
|
78
78
|
default: c(t) && (n = "A server error has occurred. Wait a few seconds and attempt the request again. If the problem persists, contact Linkly Support.");
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
d(e) && (n = "You are not connected to the internet");
|
|
81
81
|
}
|
|
82
82
|
return n;
|
|
83
83
|
}
|
|
@@ -154,7 +154,7 @@ var z = {
|
|
|
154
154
|
if (L.isAxiosError(e)) {
|
|
155
155
|
let r = e.response?.status ?? 0;
|
|
156
156
|
if (r === R.RequestTimeout || c(e)) {
|
|
157
|
-
if (t < V) return await
|
|
157
|
+
if (t < V) return await f(H), t = Math.min(t + U, V), n();
|
|
158
158
|
throw Error("Unable to get the transaction details. Please contact service provider!", { cause: e });
|
|
159
159
|
} else if (r === R.Unauthorized) return await this.getLinklyAuthToken(), n();
|
|
160
160
|
}
|
|
@@ -190,7 +190,7 @@ var z = {
|
|
|
190
190
|
data: null
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
if (n === R.RequestTimeout || c(t)) return await
|
|
193
|
+
if (n === R.RequestTimeout || c(t)) return await f(), this.reprintReceipt(e);
|
|
194
194
|
}
|
|
195
195
|
return {
|
|
196
196
|
success: !1,
|
|
@@ -219,7 +219,7 @@ var z = {
|
|
|
219
219
|
message: "Failed to authenticate. Please check your Linkly account credentials."
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
if (n === R.RequestTimeout || c(t)) return await
|
|
222
|
+
if (n === R.RequestTimeout || c(t)) return await f(), this.sendKey(e);
|
|
223
223
|
}
|
|
224
224
|
return {
|
|
225
225
|
success: !1,
|
|
@@ -240,15 +240,15 @@ var z = {
|
|
|
240
240
|
}({}), Z = /* @__PURE__ */ function(e) {
|
|
241
241
|
return e.APPROVED = "APPROVED", e.CANCELLED = "CANCELLED", e.DECLINED = "DECLINED", e.UNKNOWN = "UNKNOWN", e;
|
|
242
242
|
}({}), Q = () => {
|
|
243
|
-
let e = new
|
|
243
|
+
let e = new ue({
|
|
244
244
|
posId: t.posId,
|
|
245
245
|
posName: t.productName,
|
|
246
246
|
posVendorId: t.productVendorName,
|
|
247
247
|
posVersion: t.productVersion,
|
|
248
248
|
environment: o.value
|
|
249
249
|
}), n = async (t) => {
|
|
250
|
-
let n =
|
|
251
|
-
...
|
|
250
|
+
let n = ie.create({
|
|
251
|
+
...p,
|
|
252
252
|
message: "Pairing with the terminal..."
|
|
253
253
|
}), r = await e.pairPinpad(t);
|
|
254
254
|
return n.update({
|
|
@@ -264,11 +264,16 @@ var z = {
|
|
|
264
264
|
TxnRef: l(),
|
|
265
265
|
TxnType: n,
|
|
266
266
|
CurrencyCode: q.AustralianDollar,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
EnableTip: t.isTipEnabled ? "TRUE" : "FALSE",
|
|
268
|
+
CutReceipt: "1",
|
|
269
|
+
AmtPurchase: t.amount,
|
|
270
|
+
ReceiptAutoPrint: t.ReceiptAutoPrint ?? J.ReturnToPOS,
|
|
271
|
+
PurchaseAnalysisData: {
|
|
272
|
+
...t.isTipEnabled && t.tipAmount && { TIP: t.tipAmount },
|
|
273
|
+
...t.originalTransactionId && { RFN: t.originalTransactionId }
|
|
274
|
+
}
|
|
275
|
+
} }, i = m({
|
|
276
|
+
message: `${n === K.Purchase ? "Purchase" : "Refund"} of $${t.amount / 100} in progress...`,
|
|
272
277
|
onCancel: () => {
|
|
273
278
|
i.progress("Trying to cancel transaction..."), e.sendKey(X.Cancel);
|
|
274
279
|
}
|
|
@@ -280,25 +285,25 @@ var z = {
|
|
|
280
285
|
data: t.response,
|
|
281
286
|
tipAmount: t.response?.amtTip ?? null,
|
|
282
287
|
maskedCard: s(t.response?.pan),
|
|
283
|
-
cardScheme: t.response?.cardType
|
|
288
|
+
cardScheme: u(t.response?.cardType)
|
|
284
289
|
}) : t?.response?.responseCode === Y.GENERAL_DECLINE ? (i.failed("Transaction Declined!"), {
|
|
285
290
|
result: Z.DECLINED,
|
|
286
291
|
data: t.response,
|
|
287
292
|
tipAmount: t.response?.amtTip ?? null,
|
|
288
293
|
maskedCard: s(t.response?.pan),
|
|
289
|
-
cardScheme: t.response?.cardType
|
|
294
|
+
cardScheme: u(t.response?.cardType)
|
|
290
295
|
}) : t?.response?.responseCode === Y.CANCELLED ? (i.failed("Transaction Cancelled!"), {
|
|
291
296
|
result: Z.CANCELLED,
|
|
292
297
|
data: t.response,
|
|
293
298
|
tipAmount: t.response?.amtTip ?? null,
|
|
294
299
|
maskedCard: s(t.response?.pan),
|
|
295
|
-
cardScheme: t.response?.cardType
|
|
300
|
+
cardScheme: u(t.response?.cardType)
|
|
296
301
|
}) : (i.failed("Transaction Failed!"), {
|
|
297
302
|
result: Z.UNKNOWN,
|
|
298
303
|
data: t.response,
|
|
299
304
|
tipAmount: t.response?.amtTip ?? null,
|
|
300
305
|
maskedCard: s(t.response?.pan),
|
|
301
|
-
cardScheme: t.response?.cardType
|
|
306
|
+
cardScheme: u(t.response?.cardType)
|
|
302
307
|
});
|
|
303
308
|
} catch (e) {
|
|
304
309
|
throw i.failed("Transaction Failed!"), e;
|
|
@@ -323,7 +328,7 @@ var z = {
|
|
|
323
328
|
getTransactionBySessionId: e.getTransactionStatus,
|
|
324
329
|
getLastTransaction: e.getLastTransactionStatus
|
|
325
330
|
};
|
|
326
|
-
},
|
|
331
|
+
}, de = { class: "" }, fe = /* @__PURE__ */ b({
|
|
327
332
|
__name: "ReprintReceiptDialog",
|
|
328
333
|
props: {
|
|
329
334
|
modelValue: { type: Boolean },
|
|
@@ -331,37 +336,37 @@ var z = {
|
|
|
331
336
|
},
|
|
332
337
|
emits: ["update:modelValue"],
|
|
333
338
|
setup(e) {
|
|
334
|
-
let t = Q(), n =
|
|
339
|
+
let t = Q(), n = re(e, "modelValue"), r = S(""), i = async () => {
|
|
335
340
|
try {
|
|
336
|
-
|
|
341
|
+
D.show({ group: "reprintReceipt" });
|
|
337
342
|
let e = await t.reprintReceipt(r.value || void 0);
|
|
338
|
-
e.success ? (n.value = !1,
|
|
343
|
+
e.success ? (n.value = !1, O.create("Receipt printed successfully")) : O.create({
|
|
339
344
|
type: "negative",
|
|
340
345
|
message: e.message
|
|
341
346
|
});
|
|
342
347
|
} catch (e) {
|
|
343
348
|
let t = e instanceof Error ? e.message : "Failed to print receipts";
|
|
344
|
-
|
|
349
|
+
O.create({
|
|
345
350
|
type: "negative",
|
|
346
351
|
message: t
|
|
347
352
|
});
|
|
348
353
|
} finally {
|
|
349
|
-
|
|
354
|
+
D.hide("reprintReceipt");
|
|
350
355
|
}
|
|
351
356
|
};
|
|
352
357
|
return (e, t) => {
|
|
353
|
-
let a =
|
|
354
|
-
return
|
|
358
|
+
let a = te("close-popup");
|
|
359
|
+
return x(), h(w(M), {
|
|
355
360
|
modelValue: n.value,
|
|
356
361
|
"onUpdate:modelValue": t[1] ||= (e) => n.value = e
|
|
357
362
|
}, {
|
|
358
|
-
default:
|
|
359
|
-
default:
|
|
360
|
-
|
|
361
|
-
default:
|
|
362
|
-
default:
|
|
363
|
+
default: T(() => [y(w(A), { class: "w-full" }, {
|
|
364
|
+
default: T(() => [
|
|
365
|
+
y(w(oe), { class: "bg-primary text-white" }, {
|
|
366
|
+
default: T(() => [y(w(se), null, {
|
|
367
|
+
default: T(() => [C(e.$slots, "title", {}, () => [t[2] ||= v("Reprint Receipt", -1)])]),
|
|
363
368
|
_: 3
|
|
364
|
-
}),
|
|
369
|
+
}), E(y(w(P), {
|
|
365
370
|
class: "float-right cursor-pointer rounded p-2 transition-colors",
|
|
366
371
|
color: "gray",
|
|
367
372
|
name: "close",
|
|
@@ -369,8 +374,8 @@ var z = {
|
|
|
369
374
|
}, null, 512), [[a]])]),
|
|
370
375
|
_: 3
|
|
371
376
|
}),
|
|
372
|
-
|
|
373
|
-
default:
|
|
377
|
+
y(w(j), null, {
|
|
378
|
+
default: T(() => [_("div", de, [t[3] ||= v(" Txn Number: ", -1), y(w(F), {
|
|
374
379
|
modelValue: r.value,
|
|
375
380
|
"onUpdate:modelValue": t[0] ||= (e) => r.value = e,
|
|
376
381
|
class: "q-mb-sm",
|
|
@@ -381,16 +386,16 @@ var z = {
|
|
|
381
386
|
}, null, 8, ["modelValue"])])]),
|
|
382
387
|
_: 1
|
|
383
388
|
}),
|
|
384
|
-
|
|
389
|
+
y(w(ae), {
|
|
385
390
|
class: "!p-4",
|
|
386
391
|
align: "right"
|
|
387
392
|
}, {
|
|
388
|
-
default:
|
|
393
|
+
default: T(() => [E(y(w(k), {
|
|
389
394
|
label: "Cancel",
|
|
390
395
|
"no-caps": "",
|
|
391
396
|
unelevated: "",
|
|
392
397
|
flat: ""
|
|
393
|
-
}, null, 512), [[a]]),
|
|
398
|
+
}, null, 512), [[a]]), y(w(k), {
|
|
394
399
|
label: "Re-print Receipt",
|
|
395
400
|
"no-caps": "",
|
|
396
401
|
unelevated: "",
|
|
@@ -406,7 +411,7 @@ var z = {
|
|
|
406
411
|
}, 8, ["modelValue"]);
|
|
407
412
|
};
|
|
408
413
|
}
|
|
409
|
-
}),
|
|
414
|
+
}), pe = { class: "" }, me = { class: "text-center" }, he = { class: "mb-6" }, ge = { class: "mb-6 text-sm text-gray-500 dark:text-gray-300" }, $ = { class: "!space-x-3" }, _e = { key: 1 }, ve = { class: "flex items-center justify-end gap-3" }, ye = /* @__PURE__ */ b({
|
|
410
415
|
__name: "PairLinkly",
|
|
411
416
|
emits: ["pairing-success"],
|
|
412
417
|
setup(t, { emit: o }) {
|
|
@@ -415,69 +420,69 @@ var z = {
|
|
|
415
420
|
"Set the PIN pad up to connect to the Linkly cloud. Each bank may have different configuration settings.",
|
|
416
421
|
"Once connected, the PIN pad will display a temporary 'pair code'",
|
|
417
422
|
"Enter the username, password, and PIN pad 'pair code' from the PIN pad in the form on next screen."
|
|
418
|
-
], c = (e) => [(t) => !!t || `${e} is required`, (t) => t.length <= 16 || `${e} must be less than 16 characters.`], l = o, u = Q(), d =
|
|
423
|
+
], c = (e) => [(t) => !!t || `${e} is required`, (t) => t.length <= 16 || `${e} must be less than 16 characters.`], l = o, u = Q(), d = ce("linkly.pairConfig", {
|
|
419
424
|
isPaired: !1,
|
|
420
425
|
lastPairedDate: null
|
|
421
|
-
}), f =
|
|
426
|
+
}), f = S(!1), p = S({
|
|
422
427
|
username: "",
|
|
423
428
|
password: "",
|
|
424
429
|
pairCode: ""
|
|
425
|
-
}),
|
|
426
|
-
|
|
427
|
-
},
|
|
430
|
+
}), m = S(!d.value.isPaired), v = () => {
|
|
431
|
+
m.value = !1;
|
|
432
|
+
}, b = async () => {
|
|
428
433
|
let e = await u.pairPinpad(p.value);
|
|
429
434
|
e.success && (d.value.isPaired = !0, d.value.lastPairedDate = /* @__PURE__ */ new Date(), l("pairing-success", e));
|
|
430
435
|
}, C = () => {
|
|
431
436
|
u.unpairPinpad(), d.value.isPaired = !1, d.value.lastPairedDate = null;
|
|
432
437
|
};
|
|
433
|
-
return ee(() => {}), (t, o) => (
|
|
438
|
+
return ee(() => {}), (t, o) => (x(), g("div", pe, [w(d).isPaired ? (x(), h(w(A), {
|
|
434
439
|
key: "paired",
|
|
435
440
|
class: "flex items-center justify-center rounded-lg p-8",
|
|
436
441
|
flat: "",
|
|
437
442
|
bordered: ""
|
|
438
443
|
}, {
|
|
439
|
-
default:
|
|
440
|
-
|
|
441
|
-
name:
|
|
444
|
+
default: T(() => [_("div", me, [
|
|
445
|
+
_("div", he, [y(w(P), {
|
|
446
|
+
name: w(i),
|
|
442
447
|
size: "4rem",
|
|
443
448
|
class: "text-green-500"
|
|
444
449
|
}, null, 8, ["name"])]),
|
|
445
|
-
o[6] ||=
|
|
446
|
-
|
|
447
|
-
|
|
450
|
+
o[6] ||= _("h2", { class: "mb-4 text-3xl font-bold" }, "Terminal Connected", -1),
|
|
451
|
+
_("p", ge, " Last paired: " + ne(new Date(w(d).lastPairedDate).toLocaleString()), 1),
|
|
452
|
+
_("div", $, [y(w(k), {
|
|
448
453
|
color: "green",
|
|
449
454
|
"no-caps": "",
|
|
450
455
|
outline: "",
|
|
451
456
|
unelevated: "",
|
|
452
457
|
label: "Reprint Receipt",
|
|
453
|
-
"icon-left":
|
|
458
|
+
"icon-left": w(n),
|
|
454
459
|
onClick: o[0] ||= (e) => f.value = !0
|
|
455
|
-
}, null, 8, ["icon-left"]),
|
|
460
|
+
}, null, 8, ["icon-left"]), y(w(k), {
|
|
456
461
|
color: "primary",
|
|
457
462
|
unelevated: "",
|
|
458
463
|
"no-caps": "",
|
|
459
|
-
"icon-left":
|
|
464
|
+
"icon-left": w(r),
|
|
460
465
|
label: "Re-pair Terminal",
|
|
461
466
|
onClick: C
|
|
462
467
|
}, null, 8, ["icon-left"])])
|
|
463
468
|
])]),
|
|
464
469
|
_: 1
|
|
465
|
-
})) : (
|
|
470
|
+
})) : (x(), g("section", _e, [m.value ? (x(), h(a, {
|
|
466
471
|
key: 0,
|
|
467
|
-
onNext:
|
|
472
|
+
onNext: v,
|
|
468
473
|
steps: s
|
|
469
|
-
})) : (
|
|
474
|
+
})) : (x(), h(w(A), {
|
|
470
475
|
key: 1,
|
|
471
476
|
flat: "",
|
|
472
477
|
bordered: "",
|
|
473
478
|
class: "w-full rounded-md p-6"
|
|
474
479
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
onSubmit:
|
|
480
|
+
default: T(() => [o[7] ||= _("div", { class: "text-lg font-semibold" }, "Pairing configuration", -1), y(w(N), {
|
|
481
|
+
onSubmit: b,
|
|
477
482
|
class: "mt-6 space-y-4"
|
|
478
483
|
}, {
|
|
479
|
-
default:
|
|
480
|
-
|
|
484
|
+
default: T(() => [
|
|
485
|
+
y(w(F), {
|
|
481
486
|
modelValue: p.value.username,
|
|
482
487
|
"onUpdate:modelValue": o[1] ||= (e) => p.value.username = e,
|
|
483
488
|
rules: c("Username"),
|
|
@@ -488,7 +493,7 @@ var z = {
|
|
|
488
493
|
"no-error-icon": "",
|
|
489
494
|
dense: ""
|
|
490
495
|
}, null, 8, ["modelValue", "rules"]),
|
|
491
|
-
|
|
496
|
+
y(w(F), {
|
|
492
497
|
modelValue: p.value.password,
|
|
493
498
|
"onUpdate:modelValue": o[2] ||= (e) => p.value.password = e,
|
|
494
499
|
rules: c("Password"),
|
|
@@ -499,7 +504,7 @@ var z = {
|
|
|
499
504
|
hint: "Enter Cloud EFT Client Password",
|
|
500
505
|
dense: ""
|
|
501
506
|
}, null, 8, ["modelValue", "rules"]),
|
|
502
|
-
|
|
507
|
+
y(w(F), {
|
|
503
508
|
modelValue: p.value.pairCode,
|
|
504
509
|
"onUpdate:modelValue": o[3] ||= (e) => p.value.pairCode = e,
|
|
505
510
|
rules: c("Pairing Code"),
|
|
@@ -510,29 +515,29 @@ var z = {
|
|
|
510
515
|
hint: "Enter Pair code from terminal screen",
|
|
511
516
|
dense: ""
|
|
512
517
|
}, null, 8, ["modelValue", "rules"]),
|
|
513
|
-
|
|
518
|
+
_("div", ve, [y(w(k), {
|
|
514
519
|
flat: "",
|
|
515
520
|
"no-caps": "",
|
|
516
521
|
label: "Back",
|
|
517
|
-
"icon-left":
|
|
518
|
-
onClick: o[4] ||= (e) =>
|
|
519
|
-
}, null, 8, ["icon-left"]),
|
|
522
|
+
"icon-left": w(n),
|
|
523
|
+
onClick: o[4] ||= (e) => m.value = !0
|
|
524
|
+
}, null, 8, ["icon-left"]), y(w(k), {
|
|
520
525
|
type: "submit",
|
|
521
526
|
color: "primary",
|
|
522
527
|
unelevated: "",
|
|
523
528
|
"no-caps": "",
|
|
524
|
-
"icon-right":
|
|
529
|
+
"icon-right": w(e),
|
|
525
530
|
label: "Pair Device"
|
|
526
531
|
}, null, 8, ["icon-right"])])
|
|
527
532
|
]),
|
|
528
533
|
_: 1
|
|
529
534
|
})]),
|
|
530
535
|
_: 1
|
|
531
|
-
}))])),
|
|
536
|
+
}))])), y(fe, {
|
|
532
537
|
modelValue: f.value,
|
|
533
538
|
"onUpdate:modelValue": o[5] ||= (e) => f.value = e
|
|
534
539
|
}, null, 8, ["modelValue"])]));
|
|
535
540
|
}
|
|
536
541
|
});
|
|
537
542
|
//#endregion
|
|
538
|
-
export { J as a, K as c, X as i, Q as n, Y as o, q as r, Z as s,
|
|
543
|
+
export { J as a, K as c, X as i, Q as n, Y as o, q as r, Z as s, ye as t };
|