@achyutlabsau/vue-payment-gateway 0.14.1 → 0.15.1
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/{core-Cl5IrG_Z.js → core-BMUVlh-t.js} +25 -8
- package/dist/index.js +4 -4
- package/dist/{linkly-Bd7pRZfC.js → linkly-CT1cdbii.js} +13 -5
- package/dist/linkly.d.ts +4 -0
- package/dist/linkly.js +1 -1
- package/dist/{smartpay-BSvt0cIh.js → smartpay-ebnYmikX.js} +3 -1
- package/dist/smartpay.d.ts +10 -0
- package/dist/smartpay.js +1 -1
- package/dist/{till-payment-CRvW9BhY.js → till-payment-D4iFCkpk.js} +156 -139
- package/dist/till-payment.d.ts +130 -17
- package/dist/till-payment.js +1 -1
- package/dist/{valpay-DVhZ6XFw.js → valpay-DVV1AH4F.js} +141 -133
- package/dist/valpay.d.ts +148 -28
- package/dist/valpay.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,24 @@ import { Dialog as f, QCard as p, QCardSection as m, QDialog as h, useDialogPlug
|
|
|
4
4
|
//#region src/core/types.ts
|
|
5
5
|
var _ = /* @__PURE__ */ function(e) {
|
|
6
6
|
return e.Approved = "approved", e.Declined = "declined", e.Cancelled = "cancelled", e.Failed = "failed", e.Timeout = "timeout", e;
|
|
7
|
-
}({})
|
|
7
|
+
}({});
|
|
8
|
+
function v(e) {
|
|
9
|
+
return {
|
|
10
|
+
transactionId: null,
|
|
11
|
+
amount: null,
|
|
12
|
+
tipAmount: null,
|
|
13
|
+
surchargeAmount: null,
|
|
14
|
+
maskedCard: null,
|
|
15
|
+
cardScheme: null,
|
|
16
|
+
receipts: {},
|
|
17
|
+
raw: null,
|
|
18
|
+
...e,
|
|
19
|
+
success: e.status === "approved"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/TransactionDialog.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
+
var y = { class: "text-center text-lg font-semibold text-gray-500 uppercase" }, b = { class: "text-center text-lg font-semibold text-gray-500 uppercase" }, x = { class: "text-center text-lg font-semibold text-gray-500 uppercase" }, S = /* @__PURE__ */ a({
|
|
8
25
|
__name: "TransactionDialog",
|
|
9
26
|
props: {
|
|
10
27
|
message: {},
|
|
@@ -14,7 +31,7 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
14
31
|
emits: [...g.emits],
|
|
15
32
|
setup(a) {
|
|
16
33
|
let { dialogRef: f, onDialogHide: _ } = g();
|
|
17
|
-
return (g,
|
|
34
|
+
return (g, v) => {
|
|
18
35
|
let S = s("close-popup");
|
|
19
36
|
return o(), t(l(h), {
|
|
20
37
|
ref_key: "dialogRef",
|
|
@@ -24,7 +41,7 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
24
41
|
}, {
|
|
25
42
|
default: u(() => [i(l(p), { class: "q-dialog-plugin px-6 py-3" }, {
|
|
26
43
|
default: u(() => [a.title === "INPROGRESS" ? (o(), t(l(m), { key: 0 }, {
|
|
27
|
-
default: u(() => [r("div",
|
|
44
|
+
default: u(() => [r("div", y, c(a.message), 1), i(e, {
|
|
28
45
|
label: "Cancel",
|
|
29
46
|
onClick: a.cancelTxn,
|
|
30
47
|
color: "primary",
|
|
@@ -33,7 +50,7 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
33
50
|
}, null, 8, ["onClick"])]),
|
|
34
51
|
_: 1
|
|
35
52
|
})) : a.title === "SUCCESS" ? (o(), t(l(m), { key: 1 }, {
|
|
36
|
-
default: u(() => [r("div",
|
|
53
|
+
default: u(() => [r("div", b, c(a.message), 1), d(i(e, {
|
|
37
54
|
label: "OK",
|
|
38
55
|
color: "primary",
|
|
39
56
|
outline: "",
|
|
@@ -41,7 +58,7 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
41
58
|
}, null, 512), [[S]])]),
|
|
42
59
|
_: 1
|
|
43
60
|
})) : a.title === "FAILED" ? (o(), t(l(m), { key: 2 }, {
|
|
44
|
-
default: u(() => [r("div",
|
|
61
|
+
default: u(() => [r("div", x, c(a.message), 1), d(i(e, {
|
|
45
62
|
label: "OK",
|
|
46
63
|
color: "primary",
|
|
47
64
|
outline: "",
|
|
@@ -58,9 +75,9 @@ var _ = /* @__PURE__ */ function(e) {
|
|
|
58
75
|
});
|
|
59
76
|
//#endregion
|
|
60
77
|
//#region src/core/dialog.ts
|
|
61
|
-
function
|
|
78
|
+
function C(e) {
|
|
62
79
|
let t = e.successHideDelay ?? 1e3, n = f.create({
|
|
63
|
-
component:
|
|
80
|
+
component: S,
|
|
64
81
|
componentProps: {
|
|
65
82
|
title: "INPROGRESS",
|
|
66
83
|
message: e.message,
|
|
@@ -89,4 +106,4 @@ function S(e) {
|
|
|
89
106
|
};
|
|
90
107
|
}
|
|
91
108
|
//#endregion
|
|
92
|
-
export {
|
|
109
|
+
export { _ as n, v as r, C as t };
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@ 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
4
|
import { a as l, i as u, r as d } from "./worldline-CEiMow5_.js";
|
|
5
5
|
import { n as f } from "./utils-LqvcWjKL.js";
|
|
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-
|
|
6
|
+
import { t as p } from "./linkly-CT1cdbii.js";
|
|
7
|
+
import { t as m } from "./smartpay-ebnYmikX.js";
|
|
8
|
+
import { t as h } from "./till-payment-D4iFCkpk.js";
|
|
9
|
+
import { t as g } from "./valpay-DVV1AH4F.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,7 +1,7 @@
|
|
|
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
2
|
import { i as s, n as c, r as l, t as u } from "./utils-LqvcWjKL.js";
|
|
3
3
|
import { t as d } from "./utils-BPFf60Ai.js";
|
|
4
|
-
import { t as f } from "./core-
|
|
4
|
+
import { t as f } from "./core-BMUVlh-t.js";
|
|
5
5
|
import { createBlock as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, onMounted as ee, openBlock as y, ref as b, renderSlot as x, resolveDirective as S, toDisplayString as te, unref as C, useModel as w, withCtx as T, withDirectives as E } from "vue";
|
|
6
6
|
import { Dialog as D, Loading as O, Notify as k, QBtn as A, QCard as j, QCardActions as ne, QCardSection as re, QDialog as ie, QForm as ae, QIcon as M, QInput as N, QToolbar as P, QToolbarTitle as F } from "quasar";
|
|
7
7
|
import { useLocalStorage as oe } from "@vueuse/core";
|
|
@@ -278,19 +278,27 @@ var z = {
|
|
|
278
278
|
return t?.response?.responseCode === Y.APPROVED || t?.response?.responseCode === Y.Approved ? (i.success("Transaction Approved!"), {
|
|
279
279
|
result: Z.APPROVED,
|
|
280
280
|
data: t.response,
|
|
281
|
-
tipAmount: t.response?.amtTip ?? null
|
|
281
|
+
tipAmount: t.response?.amtTip ?? null,
|
|
282
|
+
maskedCard: t.response?.pan ?? null,
|
|
283
|
+
cardScheme: t.response?.cardType ?? null
|
|
282
284
|
}) : t?.response?.responseCode === Y.GENERAL_DECLINE ? (i.failed("Transaction Declined!"), {
|
|
283
285
|
result: Z.DECLINED,
|
|
284
286
|
data: t.response,
|
|
285
|
-
tipAmount: t.response?.amtTip ?? null
|
|
287
|
+
tipAmount: t.response?.amtTip ?? null,
|
|
288
|
+
maskedCard: t.response?.pan ?? null,
|
|
289
|
+
cardScheme: t.response?.cardType ?? null
|
|
286
290
|
}) : t?.response?.responseCode === Y.CANCELLED ? (i.failed("Transaction Cancelled!"), {
|
|
287
291
|
result: Z.CANCELLED,
|
|
288
292
|
data: t.response,
|
|
289
|
-
tipAmount: t.response?.amtTip ?? null
|
|
293
|
+
tipAmount: t.response?.amtTip ?? null,
|
|
294
|
+
maskedCard: t.response?.pan ?? null,
|
|
295
|
+
cardScheme: t.response?.cardType ?? null
|
|
290
296
|
}) : (i.failed("Transaction Failed!"), {
|
|
291
297
|
result: Z.UNKNOWN,
|
|
292
298
|
data: t.response,
|
|
293
|
-
tipAmount: t.response?.amtTip ?? null
|
|
299
|
+
tipAmount: t.response?.amtTip ?? null,
|
|
300
|
+
maskedCard: t.response?.pan ?? null,
|
|
301
|
+
cardScheme: t.response?.cardType ?? null
|
|
294
302
|
});
|
|
295
303
|
} catch (e) {
|
|
296
304
|
throw i.failed("Transaction Failed!"), e;
|
package/dist/linkly.d.ts
CHANGED
|
@@ -424,6 +424,8 @@ export declare const useLinkly: () => {
|
|
|
424
424
|
};
|
|
425
425
|
};
|
|
426
426
|
tipAmount: number;
|
|
427
|
+
maskedCard: string;
|
|
428
|
+
cardScheme: string;
|
|
427
429
|
}>;
|
|
428
430
|
initiateRefund: (data: TransactionPayload) => Promise<{
|
|
429
431
|
result: TransactionOutcome;
|
|
@@ -471,6 +473,8 @@ export declare const useLinkly: () => {
|
|
|
471
473
|
};
|
|
472
474
|
};
|
|
473
475
|
tipAmount: number;
|
|
476
|
+
maskedCard: string;
|
|
477
|
+
cardScheme: string;
|
|
474
478
|
}>;
|
|
475
479
|
reprintReceipt: (txnRef?: string) => Promise< ReceiptReprintReturn>;
|
|
476
480
|
getTransactionBySessionId: (transactionId: string) => Promise< LinklyTransactionResponse>;
|
package/dist/linkly.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./linkly-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./linkly-CT1cdbii.js";
|
|
2
2
|
export { a as CurrencyCodes, n as LinklyKeyType, s as PairLinkly, e as ReceiptAutoPrint, i as ResponseCodes, o as TransactionOutcome, t as TransactionTypes, r as useLinkly };
|
|
@@ -156,7 +156,9 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
156
156
|
R(a, e.transactionOutcome), r({
|
|
157
157
|
...e,
|
|
158
158
|
smartPayCustomerReceipt: e.responseData?.data?.Receipt,
|
|
159
|
-
tipAmount: z(e.responseData?.data?.AmountTip)
|
|
159
|
+
tipAmount: z(e.responseData?.data?.AmountTip),
|
|
160
|
+
maskedCard: e.responseData?.data?.CardPan || null,
|
|
161
|
+
cardScheme: e.responseData?.data?.CardType || null
|
|
160
162
|
}), setTimeout(a.hide, 3e3);
|
|
161
163
|
}).catch((e) => {
|
|
162
164
|
a.update({
|
package/dist/smartpay.d.ts
CHANGED
|
@@ -57,6 +57,16 @@ declare interface SmartConnectPayRef extends PollingResult {
|
|
|
57
57
|
* The tip amount in cents, flattened to the top level for easy access.
|
|
58
58
|
*/
|
|
59
59
|
tipAmount: number | null;
|
|
60
|
+
/**
|
|
61
|
+
* Masked card number (PAN), flattened to the top level for easy access, or
|
|
62
|
+
* `null` when SmartPay didn't report one.
|
|
63
|
+
*/
|
|
64
|
+
maskedCard: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Card scheme / company (e.g. "Visa", "Mastercard"), flattened to the top
|
|
67
|
+
* level for easy access, or `null` when SmartPay didn't report one.
|
|
68
|
+
*/
|
|
69
|
+
cardScheme: string | null;
|
|
60
70
|
}
|
|
61
71
|
|
|
62
72
|
export declare class SmartPay {
|
package/dist/smartpay.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./smartpay-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./smartpay-ebnYmikX.js";
|
|
2
2
|
export { n as DEV_SMARTPAY_API_URL, e as PROD_SMARTPAY_API_URL, c as PairSmartPay, a as ResultType, o as SmartPay, s as TransactionOutcome, t as TransactionResult, r as TransactionStatus, l as TransactionTypes, i as useSmartPay };
|