@achyutlabsau/vue-payment-gateway 0.16.0 → 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 +2 -2
- package/dist/{linkly-BICvJBrk.js → linkly-BVBOUjZX.js} +9 -5
- package/dist/linkly.d.ts +108 -5
- package/dist/linkly.js +1 -1
- package/dist/mx51.d.ts +89 -2
- package/dist/smartpay.d.ts +89 -2
- package/dist/till-payment.d.ts +89 -2
- package/dist/tyro.d.ts +89 -2
- package/dist/valpay.d.ts +89 -2
- package/dist/{worldline-B-YkSPMs.js → worldline-nQDVuEak.js} +4 -4
- package/dist/worldline.d.ts +98 -3
- package/dist/worldline.js +1 -1
- package/package.json +1 -1
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,9 +1,9 @@
|
|
|
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-
|
|
4
|
+
import { a as l, i as u, r as d } from "./worldline-nQDVuEak.js";
|
|
5
5
|
import { n as f } from "./utils-CAwJtwP_.js";
|
|
6
|
-
import { t as p } from "./linkly-
|
|
6
|
+
import { t as p } from "./linkly-BVBOUjZX.js";
|
|
7
7
|
import { t as m } from "./smartpay-BHnbLa5i.js";
|
|
8
8
|
import { t as h } from "./till-payment-BlnycpPt.js";
|
|
9
9
|
import { t as g } from "./valpay-Co5GhIks.js";
|
|
@@ -264,12 +264,16 @@ var z = {
|
|
|
264
264
|
TxnRef: l(),
|
|
265
265
|
TxnType: n,
|
|
266
266
|
CurrencyCode: q.AustralianDollar,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
+
}
|
|
271
275
|
} }, i = m({
|
|
272
|
-
message: `${n === K.Purchase ? "Purchase" : "Refund"} of $${t.
|
|
276
|
+
message: `${n === K.Purchase ? "Purchase" : "Refund"} of $${t.amount / 100} in progress...`,
|
|
273
277
|
onCancel: () => {
|
|
274
278
|
i.progress("Trying to cancel transaction..."), e.sendKey(X.Cancel);
|
|
275
279
|
}
|
package/dist/linkly.d.ts
CHANGED
|
@@ -259,6 +259,10 @@ export declare interface PinpadPairResponse {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
declare interface PurchaseAnalysisData {
|
|
262
|
+
/**
|
|
263
|
+
* Tip amount in cents
|
|
264
|
+
*/
|
|
265
|
+
TIP?: number;
|
|
262
266
|
OPR?: string;
|
|
263
267
|
AMT?: string;
|
|
264
268
|
PCM?: string;
|
|
@@ -330,14 +334,22 @@ export declare enum TransactionOutcome {
|
|
|
330
334
|
UNKNOWN = "UNKNOWN"
|
|
331
335
|
}
|
|
332
336
|
|
|
333
|
-
export declare
|
|
337
|
+
export declare interface TransactionPayload {
|
|
338
|
+
/**
|
|
339
|
+
* Left zero filled, amount of sale in cents.
|
|
340
|
+
*/
|
|
341
|
+
amount: number;
|
|
342
|
+
/** Tip amount in cents, or `null` when there was no tip. */
|
|
343
|
+
tipAmount?: number;
|
|
344
|
+
isTipEnabled?: boolean;
|
|
345
|
+
ReceiptAutoPrint?: ReceiptAutoPrint;
|
|
334
346
|
/**
|
|
335
347
|
* Reference Number (RFN) from the original purchase this refund relates to.
|
|
336
348
|
* When provided on a refund, Linkly performs a referenced (linked) refund by
|
|
337
349
|
* sending it as `PurchaseAnalysisData.RFN`. Ignored for purchases.
|
|
338
350
|
*/
|
|
339
|
-
|
|
340
|
-
}
|
|
351
|
+
originalTransactionId?: string;
|
|
352
|
+
}
|
|
341
353
|
|
|
342
354
|
/**
|
|
343
355
|
* View Documentation - https://www.linkly.com.au/apidoc/REST/#purchase
|
|
@@ -357,6 +369,10 @@ export declare interface TransactionPostRequest {
|
|
|
357
369
|
* Left zero filled, amount of sale in cents.
|
|
358
370
|
*/
|
|
359
371
|
AmtPurchase: number;
|
|
372
|
+
/**
|
|
373
|
+
* Set to TRUE if tipping is to be enabled for this transaction. The default is FALSE
|
|
374
|
+
*/
|
|
375
|
+
EnableTip?: "TRUE" | "FALSE";
|
|
360
376
|
/**
|
|
361
377
|
* The reference number to attach to the transaction. This will appear on the receipt.
|
|
362
378
|
*/
|
|
@@ -1483,7 +1499,8 @@ declare global {
|
|
|
1483
1499
|
cancel(): void;
|
|
1484
1500
|
// TODO:
|
|
1485
1501
|
setTransactionData(trxData: TransactionData): void;
|
|
1486
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1502
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1503
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1487
1504
|
dispose(): void;
|
|
1488
1505
|
getTransactionData(): TransactionData | undefined;
|
|
1489
1506
|
}
|
|
@@ -1514,10 +1531,96 @@ declare global {
|
|
|
1514
1531
|
}
|
|
1515
1532
|
|
|
1516
1533
|
class TransactionData {
|
|
1517
|
-
|
|
1534
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1535
|
+
dccAllowed?: boolean;
|
|
1536
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1537
|
+
trxOriginalDate?: TimeDate;
|
|
1538
|
+
/** ECR sequence counter. */
|
|
1539
|
+
ecrSeqCounter?: number;
|
|
1540
|
+
/** Whether partial approval is allowed. */
|
|
1541
|
+
partialApprovalAllowed?: boolean;
|
|
1542
|
+
/** ECR transaction reference. */
|
|
1543
|
+
transRef?: string;
|
|
1544
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1545
|
+
transSeq?: string;
|
|
1546
|
+
/** Card reference token. */
|
|
1547
|
+
cardRef?: string;
|
|
1548
|
+
/** Acquirer id. */
|
|
1549
|
+
acqId?: number;
|
|
1550
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1551
|
+
acqTransRef?: string;
|
|
1552
|
+
/** Terminal transaction reference. */
|
|
1553
|
+
trmTransRef?: string;
|
|
1554
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1555
|
+
tipAllowed?: boolean;
|
|
1556
|
+
/** Phone authorization code. */
|
|
1557
|
+
phoneAuthCode?: string;
|
|
1558
|
+
/** Cardholder/terminal language. */
|
|
1559
|
+
language?: string;
|
|
1560
|
+
/** Multi-currency flag. */
|
|
1561
|
+
multiCurrencyFlag?: boolean;
|
|
1562
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1563
|
+
ngvMode?: EnumValue;
|
|
1564
|
+
/** NGV clearing delay. */
|
|
1565
|
+
ngvClearingDelay?: number;
|
|
1566
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1567
|
+
cvc2?: string;
|
|
1568
|
+
/** Application expiration date. */
|
|
1569
|
+
appExpirationDate?: TimeDate;
|
|
1570
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1571
|
+
sixTrxRefNum?: string;
|
|
1572
|
+
/** Whether installment payment is allowed. */
|
|
1573
|
+
installmentAllowed?: boolean;
|
|
1574
|
+
/** Deferred authorization indicator. */
|
|
1575
|
+
deferredAuthInd?: boolean;
|
|
1576
|
+
/** Sub-transactions making up this transaction. */
|
|
1577
|
+
subTransactions: SubTransaction[];
|
|
1578
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1579
|
+
allowedAccounts?: EnumValue[];
|
|
1580
|
+
/** Tokenized PAN. */
|
|
1581
|
+
tokenPan?: string;
|
|
1582
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1583
|
+
tokenPanType?: EnumValue;
|
|
1584
|
+
/** Age to verify for age-restricted goods. */
|
|
1585
|
+
ageToCheck?: number;
|
|
1586
|
+
/** Authorization code. */
|
|
1587
|
+
authCode?: string;
|
|
1588
|
+
/** Forced POS entry modes. */
|
|
1589
|
+
forcePosEntryModes?: EnumValue[];
|
|
1590
|
+
/** Allowed application (brand) list. */
|
|
1591
|
+
allowedAppList?: EnumValue[];
|
|
1592
|
+
constructor(copyTrxData?: TransactionData);
|
|
1593
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1594
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1595
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1596
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1597
|
+
toString(): string;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1601
|
+
class SubTransaction {
|
|
1518
1602
|
constructor();
|
|
1519
1603
|
}
|
|
1520
1604
|
|
|
1605
|
+
/** Terminal date/time value used across the API. */
|
|
1606
|
+
class TimeDate {
|
|
1607
|
+
year: number;
|
|
1608
|
+
month: number;
|
|
1609
|
+
day: number;
|
|
1610
|
+
hour: number;
|
|
1611
|
+
minute: number;
|
|
1612
|
+
second: number;
|
|
1613
|
+
constructor();
|
|
1614
|
+
toDate(): Date;
|
|
1615
|
+
toStringRegular(): string;
|
|
1616
|
+
toStringReceiptDate(): string;
|
|
1617
|
+
toStringReceiptTime(): string;
|
|
1618
|
+
toString(): string;
|
|
1619
|
+
static fromDate(date: Date): TimeDate;
|
|
1620
|
+
static fromNow(): TimeDate;
|
|
1621
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1521
1624
|
class LogRecord {
|
|
1522
1625
|
file: string;
|
|
1523
1626
|
level: { name: string; _value: number };
|
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-BVBOUjZX.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 };
|
package/dist/mx51.d.ts
CHANGED
|
@@ -1122,7 +1122,8 @@ declare global {
|
|
|
1122
1122
|
cancel(): void;
|
|
1123
1123
|
// TODO:
|
|
1124
1124
|
setTransactionData(trxData: TransactionData): void;
|
|
1125
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1125
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1126
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1126
1127
|
dispose(): void;
|
|
1127
1128
|
getTransactionData(): TransactionData | undefined;
|
|
1128
1129
|
}
|
|
@@ -1153,10 +1154,96 @@ declare global {
|
|
|
1153
1154
|
}
|
|
1154
1155
|
|
|
1155
1156
|
class TransactionData {
|
|
1156
|
-
|
|
1157
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1158
|
+
dccAllowed?: boolean;
|
|
1159
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1160
|
+
trxOriginalDate?: TimeDate;
|
|
1161
|
+
/** ECR sequence counter. */
|
|
1162
|
+
ecrSeqCounter?: number;
|
|
1163
|
+
/** Whether partial approval is allowed. */
|
|
1164
|
+
partialApprovalAllowed?: boolean;
|
|
1165
|
+
/** ECR transaction reference. */
|
|
1166
|
+
transRef?: string;
|
|
1167
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1168
|
+
transSeq?: string;
|
|
1169
|
+
/** Card reference token. */
|
|
1170
|
+
cardRef?: string;
|
|
1171
|
+
/** Acquirer id. */
|
|
1172
|
+
acqId?: number;
|
|
1173
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1174
|
+
acqTransRef?: string;
|
|
1175
|
+
/** Terminal transaction reference. */
|
|
1176
|
+
trmTransRef?: string;
|
|
1177
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1178
|
+
tipAllowed?: boolean;
|
|
1179
|
+
/** Phone authorization code. */
|
|
1180
|
+
phoneAuthCode?: string;
|
|
1181
|
+
/** Cardholder/terminal language. */
|
|
1182
|
+
language?: string;
|
|
1183
|
+
/** Multi-currency flag. */
|
|
1184
|
+
multiCurrencyFlag?: boolean;
|
|
1185
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1186
|
+
ngvMode?: EnumValue;
|
|
1187
|
+
/** NGV clearing delay. */
|
|
1188
|
+
ngvClearingDelay?: number;
|
|
1189
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1190
|
+
cvc2?: string;
|
|
1191
|
+
/** Application expiration date. */
|
|
1192
|
+
appExpirationDate?: TimeDate;
|
|
1193
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1194
|
+
sixTrxRefNum?: string;
|
|
1195
|
+
/** Whether installment payment is allowed. */
|
|
1196
|
+
installmentAllowed?: boolean;
|
|
1197
|
+
/** Deferred authorization indicator. */
|
|
1198
|
+
deferredAuthInd?: boolean;
|
|
1199
|
+
/** Sub-transactions making up this transaction. */
|
|
1200
|
+
subTransactions: SubTransaction[];
|
|
1201
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1202
|
+
allowedAccounts?: EnumValue[];
|
|
1203
|
+
/** Tokenized PAN. */
|
|
1204
|
+
tokenPan?: string;
|
|
1205
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1206
|
+
tokenPanType?: EnumValue;
|
|
1207
|
+
/** Age to verify for age-restricted goods. */
|
|
1208
|
+
ageToCheck?: number;
|
|
1209
|
+
/** Authorization code. */
|
|
1210
|
+
authCode?: string;
|
|
1211
|
+
/** Forced POS entry modes. */
|
|
1212
|
+
forcePosEntryModes?: EnumValue[];
|
|
1213
|
+
/** Allowed application (brand) list. */
|
|
1214
|
+
allowedAppList?: EnumValue[];
|
|
1215
|
+
constructor(copyTrxData?: TransactionData);
|
|
1216
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1217
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1218
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1219
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1220
|
+
toString(): string;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1224
|
+
class SubTransaction {
|
|
1157
1225
|
constructor();
|
|
1158
1226
|
}
|
|
1159
1227
|
|
|
1228
|
+
/** Terminal date/time value used across the API. */
|
|
1229
|
+
class TimeDate {
|
|
1230
|
+
year: number;
|
|
1231
|
+
month: number;
|
|
1232
|
+
day: number;
|
|
1233
|
+
hour: number;
|
|
1234
|
+
minute: number;
|
|
1235
|
+
second: number;
|
|
1236
|
+
constructor();
|
|
1237
|
+
toDate(): Date;
|
|
1238
|
+
toStringRegular(): string;
|
|
1239
|
+
toStringReceiptDate(): string;
|
|
1240
|
+
toStringReceiptTime(): string;
|
|
1241
|
+
toString(): string;
|
|
1242
|
+
static fromDate(date: Date): TimeDate;
|
|
1243
|
+
static fromNow(): TimeDate;
|
|
1244
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1160
1247
|
class LogRecord {
|
|
1161
1248
|
file: string;
|
|
1162
1249
|
level: { name: string; _value: number };
|
package/dist/smartpay.d.ts
CHANGED
|
@@ -1160,7 +1160,8 @@ declare global {
|
|
|
1160
1160
|
cancel(): void;
|
|
1161
1161
|
// TODO:
|
|
1162
1162
|
setTransactionData(trxData: TransactionData): void;
|
|
1163
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1163
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1164
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1164
1165
|
dispose(): void;
|
|
1165
1166
|
getTransactionData(): TransactionData | undefined;
|
|
1166
1167
|
}
|
|
@@ -1191,10 +1192,96 @@ declare global {
|
|
|
1191
1192
|
}
|
|
1192
1193
|
|
|
1193
1194
|
class TransactionData {
|
|
1194
|
-
|
|
1195
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1196
|
+
dccAllowed?: boolean;
|
|
1197
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1198
|
+
trxOriginalDate?: TimeDate;
|
|
1199
|
+
/** ECR sequence counter. */
|
|
1200
|
+
ecrSeqCounter?: number;
|
|
1201
|
+
/** Whether partial approval is allowed. */
|
|
1202
|
+
partialApprovalAllowed?: boolean;
|
|
1203
|
+
/** ECR transaction reference. */
|
|
1204
|
+
transRef?: string;
|
|
1205
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1206
|
+
transSeq?: string;
|
|
1207
|
+
/** Card reference token. */
|
|
1208
|
+
cardRef?: string;
|
|
1209
|
+
/** Acquirer id. */
|
|
1210
|
+
acqId?: number;
|
|
1211
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1212
|
+
acqTransRef?: string;
|
|
1213
|
+
/** Terminal transaction reference. */
|
|
1214
|
+
trmTransRef?: string;
|
|
1215
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1216
|
+
tipAllowed?: boolean;
|
|
1217
|
+
/** Phone authorization code. */
|
|
1218
|
+
phoneAuthCode?: string;
|
|
1219
|
+
/** Cardholder/terminal language. */
|
|
1220
|
+
language?: string;
|
|
1221
|
+
/** Multi-currency flag. */
|
|
1222
|
+
multiCurrencyFlag?: boolean;
|
|
1223
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1224
|
+
ngvMode?: EnumValue;
|
|
1225
|
+
/** NGV clearing delay. */
|
|
1226
|
+
ngvClearingDelay?: number;
|
|
1227
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1228
|
+
cvc2?: string;
|
|
1229
|
+
/** Application expiration date. */
|
|
1230
|
+
appExpirationDate?: TimeDate;
|
|
1231
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1232
|
+
sixTrxRefNum?: string;
|
|
1233
|
+
/** Whether installment payment is allowed. */
|
|
1234
|
+
installmentAllowed?: boolean;
|
|
1235
|
+
/** Deferred authorization indicator. */
|
|
1236
|
+
deferredAuthInd?: boolean;
|
|
1237
|
+
/** Sub-transactions making up this transaction. */
|
|
1238
|
+
subTransactions: SubTransaction[];
|
|
1239
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1240
|
+
allowedAccounts?: EnumValue[];
|
|
1241
|
+
/** Tokenized PAN. */
|
|
1242
|
+
tokenPan?: string;
|
|
1243
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1244
|
+
tokenPanType?: EnumValue;
|
|
1245
|
+
/** Age to verify for age-restricted goods. */
|
|
1246
|
+
ageToCheck?: number;
|
|
1247
|
+
/** Authorization code. */
|
|
1248
|
+
authCode?: string;
|
|
1249
|
+
/** Forced POS entry modes. */
|
|
1250
|
+
forcePosEntryModes?: EnumValue[];
|
|
1251
|
+
/** Allowed application (brand) list. */
|
|
1252
|
+
allowedAppList?: EnumValue[];
|
|
1253
|
+
constructor(copyTrxData?: TransactionData);
|
|
1254
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1255
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1256
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1257
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1258
|
+
toString(): string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1262
|
+
class SubTransaction {
|
|
1195
1263
|
constructor();
|
|
1196
1264
|
}
|
|
1197
1265
|
|
|
1266
|
+
/** Terminal date/time value used across the API. */
|
|
1267
|
+
class TimeDate {
|
|
1268
|
+
year: number;
|
|
1269
|
+
month: number;
|
|
1270
|
+
day: number;
|
|
1271
|
+
hour: number;
|
|
1272
|
+
minute: number;
|
|
1273
|
+
second: number;
|
|
1274
|
+
constructor();
|
|
1275
|
+
toDate(): Date;
|
|
1276
|
+
toStringRegular(): string;
|
|
1277
|
+
toStringReceiptDate(): string;
|
|
1278
|
+
toStringReceiptTime(): string;
|
|
1279
|
+
toString(): string;
|
|
1280
|
+
static fromDate(date: Date): TimeDate;
|
|
1281
|
+
static fromNow(): TimeDate;
|
|
1282
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1198
1285
|
class LogRecord {
|
|
1199
1286
|
file: string;
|
|
1200
1287
|
level: { name: string; _value: number };
|
package/dist/till-payment.d.ts
CHANGED
|
@@ -1466,7 +1466,8 @@ declare global {
|
|
|
1466
1466
|
cancel(): void;
|
|
1467
1467
|
// TODO:
|
|
1468
1468
|
setTransactionData(trxData: TransactionData): void;
|
|
1469
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1469
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1470
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1470
1471
|
dispose(): void;
|
|
1471
1472
|
getTransactionData(): TransactionData | undefined;
|
|
1472
1473
|
}
|
|
@@ -1497,10 +1498,96 @@ declare global {
|
|
|
1497
1498
|
}
|
|
1498
1499
|
|
|
1499
1500
|
class TransactionData {
|
|
1500
|
-
|
|
1501
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1502
|
+
dccAllowed?: boolean;
|
|
1503
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1504
|
+
trxOriginalDate?: TimeDate;
|
|
1505
|
+
/** ECR sequence counter. */
|
|
1506
|
+
ecrSeqCounter?: number;
|
|
1507
|
+
/** Whether partial approval is allowed. */
|
|
1508
|
+
partialApprovalAllowed?: boolean;
|
|
1509
|
+
/** ECR transaction reference. */
|
|
1510
|
+
transRef?: string;
|
|
1511
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1512
|
+
transSeq?: string;
|
|
1513
|
+
/** Card reference token. */
|
|
1514
|
+
cardRef?: string;
|
|
1515
|
+
/** Acquirer id. */
|
|
1516
|
+
acqId?: number;
|
|
1517
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1518
|
+
acqTransRef?: string;
|
|
1519
|
+
/** Terminal transaction reference. */
|
|
1520
|
+
trmTransRef?: string;
|
|
1521
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1522
|
+
tipAllowed?: boolean;
|
|
1523
|
+
/** Phone authorization code. */
|
|
1524
|
+
phoneAuthCode?: string;
|
|
1525
|
+
/** Cardholder/terminal language. */
|
|
1526
|
+
language?: string;
|
|
1527
|
+
/** Multi-currency flag. */
|
|
1528
|
+
multiCurrencyFlag?: boolean;
|
|
1529
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1530
|
+
ngvMode?: EnumValue;
|
|
1531
|
+
/** NGV clearing delay. */
|
|
1532
|
+
ngvClearingDelay?: number;
|
|
1533
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1534
|
+
cvc2?: string;
|
|
1535
|
+
/** Application expiration date. */
|
|
1536
|
+
appExpirationDate?: TimeDate;
|
|
1537
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1538
|
+
sixTrxRefNum?: string;
|
|
1539
|
+
/** Whether installment payment is allowed. */
|
|
1540
|
+
installmentAllowed?: boolean;
|
|
1541
|
+
/** Deferred authorization indicator. */
|
|
1542
|
+
deferredAuthInd?: boolean;
|
|
1543
|
+
/** Sub-transactions making up this transaction. */
|
|
1544
|
+
subTransactions: SubTransaction[];
|
|
1545
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1546
|
+
allowedAccounts?: EnumValue[];
|
|
1547
|
+
/** Tokenized PAN. */
|
|
1548
|
+
tokenPan?: string;
|
|
1549
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1550
|
+
tokenPanType?: EnumValue;
|
|
1551
|
+
/** Age to verify for age-restricted goods. */
|
|
1552
|
+
ageToCheck?: number;
|
|
1553
|
+
/** Authorization code. */
|
|
1554
|
+
authCode?: string;
|
|
1555
|
+
/** Forced POS entry modes. */
|
|
1556
|
+
forcePosEntryModes?: EnumValue[];
|
|
1557
|
+
/** Allowed application (brand) list. */
|
|
1558
|
+
allowedAppList?: EnumValue[];
|
|
1559
|
+
constructor(copyTrxData?: TransactionData);
|
|
1560
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1561
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1562
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1563
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1564
|
+
toString(): string;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1568
|
+
class SubTransaction {
|
|
1501
1569
|
constructor();
|
|
1502
1570
|
}
|
|
1503
1571
|
|
|
1572
|
+
/** Terminal date/time value used across the API. */
|
|
1573
|
+
class TimeDate {
|
|
1574
|
+
year: number;
|
|
1575
|
+
month: number;
|
|
1576
|
+
day: number;
|
|
1577
|
+
hour: number;
|
|
1578
|
+
minute: number;
|
|
1579
|
+
second: number;
|
|
1580
|
+
constructor();
|
|
1581
|
+
toDate(): Date;
|
|
1582
|
+
toStringRegular(): string;
|
|
1583
|
+
toStringReceiptDate(): string;
|
|
1584
|
+
toStringReceiptTime(): string;
|
|
1585
|
+
toString(): string;
|
|
1586
|
+
static fromDate(date: Date): TimeDate;
|
|
1587
|
+
static fromNow(): TimeDate;
|
|
1588
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1504
1591
|
class LogRecord {
|
|
1505
1592
|
file: string;
|
|
1506
1593
|
level: { name: string; _value: number };
|
package/dist/tyro.d.ts
CHANGED
|
@@ -1176,7 +1176,8 @@ declare global {
|
|
|
1176
1176
|
cancel(): void;
|
|
1177
1177
|
// TODO:
|
|
1178
1178
|
setTransactionData(trxData: TransactionData): void;
|
|
1179
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1179
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1180
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1180
1181
|
dispose(): void;
|
|
1181
1182
|
getTransactionData(): TransactionData | undefined;
|
|
1182
1183
|
}
|
|
@@ -1207,10 +1208,96 @@ declare global {
|
|
|
1207
1208
|
}
|
|
1208
1209
|
|
|
1209
1210
|
class TransactionData {
|
|
1210
|
-
|
|
1211
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1212
|
+
dccAllowed?: boolean;
|
|
1213
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1214
|
+
trxOriginalDate?: TimeDate;
|
|
1215
|
+
/** ECR sequence counter. */
|
|
1216
|
+
ecrSeqCounter?: number;
|
|
1217
|
+
/** Whether partial approval is allowed. */
|
|
1218
|
+
partialApprovalAllowed?: boolean;
|
|
1219
|
+
/** ECR transaction reference. */
|
|
1220
|
+
transRef?: string;
|
|
1221
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1222
|
+
transSeq?: string;
|
|
1223
|
+
/** Card reference token. */
|
|
1224
|
+
cardRef?: string;
|
|
1225
|
+
/** Acquirer id. */
|
|
1226
|
+
acqId?: number;
|
|
1227
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1228
|
+
acqTransRef?: string;
|
|
1229
|
+
/** Terminal transaction reference. */
|
|
1230
|
+
trmTransRef?: string;
|
|
1231
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1232
|
+
tipAllowed?: boolean;
|
|
1233
|
+
/** Phone authorization code. */
|
|
1234
|
+
phoneAuthCode?: string;
|
|
1235
|
+
/** Cardholder/terminal language. */
|
|
1236
|
+
language?: string;
|
|
1237
|
+
/** Multi-currency flag. */
|
|
1238
|
+
multiCurrencyFlag?: boolean;
|
|
1239
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1240
|
+
ngvMode?: EnumValue;
|
|
1241
|
+
/** NGV clearing delay. */
|
|
1242
|
+
ngvClearingDelay?: number;
|
|
1243
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1244
|
+
cvc2?: string;
|
|
1245
|
+
/** Application expiration date. */
|
|
1246
|
+
appExpirationDate?: TimeDate;
|
|
1247
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1248
|
+
sixTrxRefNum?: string;
|
|
1249
|
+
/** Whether installment payment is allowed. */
|
|
1250
|
+
installmentAllowed?: boolean;
|
|
1251
|
+
/** Deferred authorization indicator. */
|
|
1252
|
+
deferredAuthInd?: boolean;
|
|
1253
|
+
/** Sub-transactions making up this transaction. */
|
|
1254
|
+
subTransactions: SubTransaction[];
|
|
1255
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1256
|
+
allowedAccounts?: EnumValue[];
|
|
1257
|
+
/** Tokenized PAN. */
|
|
1258
|
+
tokenPan?: string;
|
|
1259
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1260
|
+
tokenPanType?: EnumValue;
|
|
1261
|
+
/** Age to verify for age-restricted goods. */
|
|
1262
|
+
ageToCheck?: number;
|
|
1263
|
+
/** Authorization code. */
|
|
1264
|
+
authCode?: string;
|
|
1265
|
+
/** Forced POS entry modes. */
|
|
1266
|
+
forcePosEntryModes?: EnumValue[];
|
|
1267
|
+
/** Allowed application (brand) list. */
|
|
1268
|
+
allowedAppList?: EnumValue[];
|
|
1269
|
+
constructor(copyTrxData?: TransactionData);
|
|
1270
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1271
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1272
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1273
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1274
|
+
toString(): string;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1278
|
+
class SubTransaction {
|
|
1211
1279
|
constructor();
|
|
1212
1280
|
}
|
|
1213
1281
|
|
|
1282
|
+
/** Terminal date/time value used across the API. */
|
|
1283
|
+
class TimeDate {
|
|
1284
|
+
year: number;
|
|
1285
|
+
month: number;
|
|
1286
|
+
day: number;
|
|
1287
|
+
hour: number;
|
|
1288
|
+
minute: number;
|
|
1289
|
+
second: number;
|
|
1290
|
+
constructor();
|
|
1291
|
+
toDate(): Date;
|
|
1292
|
+
toStringRegular(): string;
|
|
1293
|
+
toStringReceiptDate(): string;
|
|
1294
|
+
toStringReceiptTime(): string;
|
|
1295
|
+
toString(): string;
|
|
1296
|
+
static fromDate(date: Date): TimeDate;
|
|
1297
|
+
static fromNow(): TimeDate;
|
|
1298
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1214
1301
|
class LogRecord {
|
|
1215
1302
|
file: string;
|
|
1216
1303
|
level: { name: string; _value: number };
|
package/dist/valpay.d.ts
CHANGED
|
@@ -1857,7 +1857,8 @@ declare global {
|
|
|
1857
1857
|
cancel(): void;
|
|
1858
1858
|
// TODO:
|
|
1859
1859
|
setTransactionData(trxData: TransactionData): void;
|
|
1860
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1860
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1861
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1861
1862
|
dispose(): void;
|
|
1862
1863
|
getTransactionData(): TransactionData | undefined;
|
|
1863
1864
|
}
|
|
@@ -1888,10 +1889,96 @@ declare global {
|
|
|
1888
1889
|
}
|
|
1889
1890
|
|
|
1890
1891
|
class TransactionData {
|
|
1891
|
-
|
|
1892
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1893
|
+
dccAllowed?: boolean;
|
|
1894
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1895
|
+
trxOriginalDate?: TimeDate;
|
|
1896
|
+
/** ECR sequence counter. */
|
|
1897
|
+
ecrSeqCounter?: number;
|
|
1898
|
+
/** Whether partial approval is allowed. */
|
|
1899
|
+
partialApprovalAllowed?: boolean;
|
|
1900
|
+
/** ECR transaction reference. */
|
|
1901
|
+
transRef?: string;
|
|
1902
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1903
|
+
transSeq?: string;
|
|
1904
|
+
/** Card reference token. */
|
|
1905
|
+
cardRef?: string;
|
|
1906
|
+
/** Acquirer id. */
|
|
1907
|
+
acqId?: number;
|
|
1908
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1909
|
+
acqTransRef?: string;
|
|
1910
|
+
/** Terminal transaction reference. */
|
|
1911
|
+
trmTransRef?: string;
|
|
1912
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1913
|
+
tipAllowed?: boolean;
|
|
1914
|
+
/** Phone authorization code. */
|
|
1915
|
+
phoneAuthCode?: string;
|
|
1916
|
+
/** Cardholder/terminal language. */
|
|
1917
|
+
language?: string;
|
|
1918
|
+
/** Multi-currency flag. */
|
|
1919
|
+
multiCurrencyFlag?: boolean;
|
|
1920
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1921
|
+
ngvMode?: EnumValue;
|
|
1922
|
+
/** NGV clearing delay. */
|
|
1923
|
+
ngvClearingDelay?: number;
|
|
1924
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1925
|
+
cvc2?: string;
|
|
1926
|
+
/** Application expiration date. */
|
|
1927
|
+
appExpirationDate?: TimeDate;
|
|
1928
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1929
|
+
sixTrxRefNum?: string;
|
|
1930
|
+
/** Whether installment payment is allowed. */
|
|
1931
|
+
installmentAllowed?: boolean;
|
|
1932
|
+
/** Deferred authorization indicator. */
|
|
1933
|
+
deferredAuthInd?: boolean;
|
|
1934
|
+
/** Sub-transactions making up this transaction. */
|
|
1935
|
+
subTransactions: SubTransaction[];
|
|
1936
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1937
|
+
allowedAccounts?: EnumValue[];
|
|
1938
|
+
/** Tokenized PAN. */
|
|
1939
|
+
tokenPan?: string;
|
|
1940
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1941
|
+
tokenPanType?: EnumValue;
|
|
1942
|
+
/** Age to verify for age-restricted goods. */
|
|
1943
|
+
ageToCheck?: number;
|
|
1944
|
+
/** Authorization code. */
|
|
1945
|
+
authCode?: string;
|
|
1946
|
+
/** Forced POS entry modes. */
|
|
1947
|
+
forcePosEntryModes?: EnumValue[];
|
|
1948
|
+
/** Allowed application (brand) list. */
|
|
1949
|
+
allowedAppList?: EnumValue[];
|
|
1950
|
+
constructor(copyTrxData?: TransactionData);
|
|
1951
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1952
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1953
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1954
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1955
|
+
toString(): string;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1959
|
+
class SubTransaction {
|
|
1892
1960
|
constructor();
|
|
1893
1961
|
}
|
|
1894
1962
|
|
|
1963
|
+
/** Terminal date/time value used across the API. */
|
|
1964
|
+
class TimeDate {
|
|
1965
|
+
year: number;
|
|
1966
|
+
month: number;
|
|
1967
|
+
day: number;
|
|
1968
|
+
hour: number;
|
|
1969
|
+
minute: number;
|
|
1970
|
+
second: number;
|
|
1971
|
+
constructor();
|
|
1972
|
+
toDate(): Date;
|
|
1973
|
+
toStringRegular(): string;
|
|
1974
|
+
toStringReceiptDate(): string;
|
|
1975
|
+
toStringReceiptTime(): string;
|
|
1976
|
+
toString(): string;
|
|
1977
|
+
static fromDate(date: Date): TimeDate;
|
|
1978
|
+
static fromNow(): TimeDate;
|
|
1979
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1895
1982
|
class LogRecord {
|
|
1896
1983
|
file: string;
|
|
1897
1984
|
level: { name: string; _value: number };
|
|
@@ -109,7 +109,7 @@ var R = new class extends P {
|
|
|
109
109
|
}
|
|
110
110
|
createTerminal(e, t) {
|
|
111
111
|
let n = new timapi.TerminalSettings();
|
|
112
|
-
n.connectionIPString = e, n.connectionIPPort = t, n.persistentState = !0, n.enableKeepAlive = !0, n.autoCommit = !0, n.dcc = !1, n.tipAllowed = !
|
|
112
|
+
n.connectionIPString = e, n.connectionIPPort = t, n.persistentState = !0, n.enableKeepAlive = !0, n.autoCommit = !0, n.dcc = !1, n.tipAllowed = !0, n.partialApproval = !1, n.integratorId = this._config.integratorId, n.guides.add(timapi.constants.Guides.retail), n.guides.add(timapi.constants.Guides.gastro), this.terminal = new timapi.Terminal(n), this.terminal.setUserId("1"), this.terminal.setPosId(this._config.posId);
|
|
113
113
|
let r = new timapi.EcrInfo();
|
|
114
114
|
return r.type = timapi.constants.EcrInfoType.ecrApplication, r.name = this._config.posName, r.manufacturerName = this._config.posVendorName, r.version = this._config.posVersion, this.terminal.addEcrData(r), this.terminal;
|
|
115
115
|
}
|
|
@@ -160,10 +160,10 @@ var R = new class extends P {
|
|
|
160
160
|
actionReconfig() {
|
|
161
161
|
this.isReady && (this.ensureTerminal().reconfigAsync(), this.requestInProgress = timapi.constants.RequestType.reconfig);
|
|
162
162
|
}
|
|
163
|
-
actionPurchase(e) {
|
|
163
|
+
actionPurchase(e, n) {
|
|
164
164
|
if (this.isReady) try {
|
|
165
|
-
let
|
|
166
|
-
this.ensureTerminal().
|
|
165
|
+
let r = new timapi.Amount(e, timapi.constants.Currency.AUD), i = new timapi.Amount(n ?? 0, timapi.constants.Currency.AUD);
|
|
166
|
+
this.ensureTerminal().transactionTipAsync(timapi.constants.TransactionType.purchase, r, i), t.emit("txnStarted", e, "purchase");
|
|
167
167
|
} catch (e) {
|
|
168
168
|
t.emit("txnCompleted", {
|
|
169
169
|
exception: e,
|
package/dist/worldline.d.ts
CHANGED
|
@@ -43,7 +43,15 @@ declare class AdvanceEcr {
|
|
|
43
43
|
actionReceiptRequest(type: string): void;
|
|
44
44
|
actionSoftwareUpdate(): void;
|
|
45
45
|
actionReconfig(): void;
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Make a purchase, optionally with a tip.
|
|
48
|
+
*
|
|
49
|
+
* Runs a tip-enabled purchase via TimAPI's `transactionTipAsync`, which
|
|
50
|
+
* requires the `gastro` guide and `tipAllowed` to be set on the terminal
|
|
51
|
+
* (both configured during terminal setup). `purchaseAmount` and `tipAmount`
|
|
52
|
+
* are in cents. When `tipAmount` is omitted it defaults to `10` cents.
|
|
53
|
+
*/
|
|
54
|
+
actionPurchase(purchaseAmount: number, tipAmount?: number): void;
|
|
47
55
|
/**
|
|
48
56
|
* Make a refund.
|
|
49
57
|
*
|
|
@@ -1093,7 +1101,8 @@ declare global {
|
|
|
1093
1101
|
cancel(): void;
|
|
1094
1102
|
// TODO:
|
|
1095
1103
|
setTransactionData(trxData: TransactionData): void;
|
|
1096
|
-
transactionAsync(txnType: EnumValue, amount
|
|
1104
|
+
transactionAsync(txnType: EnumValue, amount: Amount): void;
|
|
1105
|
+
transactionTipAsync(txnType: EnumValue, amount: Amount, amountTip?: Amount): void;
|
|
1097
1106
|
dispose(): void;
|
|
1098
1107
|
getTransactionData(): TransactionData | undefined;
|
|
1099
1108
|
}
|
|
@@ -1124,10 +1133,96 @@ declare global {
|
|
|
1124
1133
|
}
|
|
1125
1134
|
|
|
1126
1135
|
class TransactionData {
|
|
1127
|
-
|
|
1136
|
+
/** Whether Dynamic Currency Conversion is allowed for the transaction. */
|
|
1137
|
+
dccAllowed?: boolean;
|
|
1138
|
+
/** Date of the original transaction (used for referenced/follow-up transactions). */
|
|
1139
|
+
trxOriginalDate?: TimeDate;
|
|
1140
|
+
/** ECR sequence counter. */
|
|
1141
|
+
ecrSeqCounter?: number;
|
|
1142
|
+
/** Whether partial approval is allowed. */
|
|
1143
|
+
partialApprovalAllowed?: boolean;
|
|
1144
|
+
/** ECR transaction reference. */
|
|
1145
|
+
transRef?: string;
|
|
1146
|
+
/** Terminal transaction sequence number — references the original sale for a reversal. */
|
|
1147
|
+
transSeq?: string;
|
|
1148
|
+
/** Card reference token. */
|
|
1149
|
+
cardRef?: string;
|
|
1150
|
+
/** Acquirer id. */
|
|
1151
|
+
acqId?: number;
|
|
1152
|
+
/** Acquirer transaction reference. Prefer {@link setAcqTransRef}. */
|
|
1153
|
+
acqTransRef?: string;
|
|
1154
|
+
/** Terminal transaction reference. */
|
|
1155
|
+
trmTransRef?: string;
|
|
1156
|
+
/** Whether tipping is allowed for the transaction. */
|
|
1157
|
+
tipAllowed?: boolean;
|
|
1158
|
+
/** Phone authorization code. */
|
|
1159
|
+
phoneAuthCode?: string;
|
|
1160
|
+
/** Cardholder/terminal language. */
|
|
1161
|
+
language?: string;
|
|
1162
|
+
/** Multi-currency flag. */
|
|
1163
|
+
multiCurrencyFlag?: boolean;
|
|
1164
|
+
/** NGV mode. One of the `Constants.NgvMode` enum values. */
|
|
1165
|
+
ngvMode?: EnumValue;
|
|
1166
|
+
/** NGV clearing delay. */
|
|
1167
|
+
ngvClearingDelay?: number;
|
|
1168
|
+
/** Card verification code (CVC2/CVV2). */
|
|
1169
|
+
cvc2?: string;
|
|
1170
|
+
/** Application expiration date. */
|
|
1171
|
+
appExpirationDate?: TimeDate;
|
|
1172
|
+
/** SIX transaction reference number. Prefer {@link setSixTrxRefNum}. */
|
|
1173
|
+
sixTrxRefNum?: string;
|
|
1174
|
+
/** Whether installment payment is allowed. */
|
|
1175
|
+
installmentAllowed?: boolean;
|
|
1176
|
+
/** Deferred authorization indicator. */
|
|
1177
|
+
deferredAuthInd?: boolean;
|
|
1178
|
+
/** Sub-transactions making up this transaction. */
|
|
1179
|
+
subTransactions: SubTransaction[];
|
|
1180
|
+
/** Allowed account types. Each is a `Constants.AllowedAccounts` enum value. */
|
|
1181
|
+
allowedAccounts?: EnumValue[];
|
|
1182
|
+
/** Tokenized PAN. */
|
|
1183
|
+
tokenPan?: string;
|
|
1184
|
+
/** Token PAN type. One of the `Constants.TokenPanType` enum values. */
|
|
1185
|
+
tokenPanType?: EnumValue;
|
|
1186
|
+
/** Age to verify for age-restricted goods. */
|
|
1187
|
+
ageToCheck?: number;
|
|
1188
|
+
/** Authorization code. */
|
|
1189
|
+
authCode?: string;
|
|
1190
|
+
/** Forced POS entry modes. */
|
|
1191
|
+
forcePosEntryModes?: EnumValue[];
|
|
1192
|
+
/** Allowed application (brand) list. */
|
|
1193
|
+
allowedAppList?: EnumValue[];
|
|
1194
|
+
constructor(copyTrxData?: TransactionData);
|
|
1195
|
+
/** Build {@link acqTransRef} from an acquirer id and transaction reference number. */
|
|
1196
|
+
setAcqTransRef(acqId: number, trxRefNo: number): void;
|
|
1197
|
+
/** Build {@link sixTrxRefNum} from an acquirer id and transaction reference number. */
|
|
1198
|
+
setSixTrxRefNum(acqId: number, trxRefNum: number): void;
|
|
1199
|
+
toString(): string;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** Sub-transaction entry within {@link TransactionData.subTransactions}. */
|
|
1203
|
+
class SubTransaction {
|
|
1128
1204
|
constructor();
|
|
1129
1205
|
}
|
|
1130
1206
|
|
|
1207
|
+
/** Terminal date/time value used across the API. */
|
|
1208
|
+
class TimeDate {
|
|
1209
|
+
year: number;
|
|
1210
|
+
month: number;
|
|
1211
|
+
day: number;
|
|
1212
|
+
hour: number;
|
|
1213
|
+
minute: number;
|
|
1214
|
+
second: number;
|
|
1215
|
+
constructor();
|
|
1216
|
+
toDate(): Date;
|
|
1217
|
+
toStringRegular(): string;
|
|
1218
|
+
toStringReceiptDate(): string;
|
|
1219
|
+
toStringReceiptTime(): string;
|
|
1220
|
+
toString(): string;
|
|
1221
|
+
static fromDate(date: Date): TimeDate;
|
|
1222
|
+
static fromNow(): TimeDate;
|
|
1223
|
+
static copy(timeDate: TimeDate): TimeDate;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1131
1226
|
class LogRecord {
|
|
1132
1227
|
file: string;
|
|
1133
1228
|
level: { name: string; _value: number };
|
package/dist/worldline.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as e } from "./emitter-BNPvJMuc.js";
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./worldline-
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./worldline-nQDVuEak.js";
|
|
3
3
|
export { a as PairTimapi, r as TimApiDialog, t as TimApiEvents, o as TimApiLogs, i as TransactionTypes, e as emitter, n as timApi };
|