gap-nodejs-sdk 1.0.134 → 1.0.135
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/clover/Clover.d.ts +2 -2
- package/dist/clover/Clover.d.ts.map +1 -1
- package/dist/clover/Clover.js +10 -7
- package/dist/clover/CloverPayment.d.ts +19 -0
- package/dist/clover/CloverPayment.d.ts.map +1 -0
- package/dist/clover/CloverPayment.js +72 -0
- package/dist/clover/CloverPaymentObject.d.ts +68 -0
- package/dist/clover/CloverPaymentObject.d.ts.map +1 -0
- package/dist/clover/CloverPaymentObject.js +505 -0
- package/dist/clover/clover_payment_response_model.d.ts +6 -0
- package/dist/clover/clover_payment_response_model.d.ts.map +1 -0
- package/dist/clover/clover_payment_response_model.js +72 -0
- package/dist/clover/enums.d.ts +11 -0
- package/dist/clover/enums.d.ts.map +1 -0
- package/dist/clover/enums.js +11 -0
- package/dist/clover/payment_response_model.d.ts +3 -11
- package/dist/clover/payment_response_model.d.ts.map +1 -1
- package/dist/clover/payment_response_model.js +1 -73
- package/dist/executor/callback.d.ts +6 -0
- package/dist/executor/callback.d.ts.map +1 -0
- package/dist/executor/callback.js +1 -0
- package/dist/executor/executor_helper.d.ts +13 -0
- package/dist/executor/executor_helper.d.ts.map +1 -0
- package/dist/executor/executor_helper.js +41 -0
- package/dist/gap-sdk.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/payment/payment_interface.d.ts +18 -0
- package/dist/payment/payment_interface.d.ts.map +1 -0
- package/dist/payment/payment_interface.js +1 -0
- package/dist/payment/type.d.ts +9 -0
- package/dist/payment/type.d.ts.map +1 -0
- package/dist/payment/type.js +5 -0
- package/package.json +1 -1
package/dist/clover/Clover.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as clover from "@xuantan97/remote-pay-cloud";
|
|
2
|
-
import {
|
|
2
|
+
import { CloverPaymentResponseModel } from "./clover_payment_response_model";
|
|
3
3
|
import { AdjustInput, PaymentInput, RefundInput, RetrieveInput, VoidInput } from "./types";
|
|
4
4
|
export { clover };
|
|
5
5
|
export default class Clover {
|
|
@@ -24,7 +24,7 @@ export default class Clover {
|
|
|
24
24
|
retrievePaymentResponse: clover.remotepay.RetrievePaymentResponse | null;
|
|
25
25
|
retrievePendingPaymentsResponse: clover.remotepay.RetrievePendingPaymentsResponse | null;
|
|
26
26
|
retrieveDeviceStatusResponse: clover.remotepay.RetrieveDeviceStatusResponse | null;
|
|
27
|
-
paymentResponse:
|
|
27
|
+
paymentResponse: CloverPaymentResponseModel | null;
|
|
28
28
|
constructor({ cloverConfig, onPairingCode, onPairingSuccess }: {
|
|
29
29
|
cloverConfig: any;
|
|
30
30
|
onPairingCode?: (pairingCode: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clover.d.ts","sourceRoot":"","sources":["../../src/clover/Clover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Clover.d.ts","sourceRoot":"","sources":["../../src/clover/Clover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3F,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAQ;IACjE,WAAW,EAAE,GAAG,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAIlB,kBAAkB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from "./clover_payment_response_model";
|
|
3
3
|
export { clover };
|
|
4
4
|
export default class Clover {
|
|
5
5
|
constructor({ cloverConfig, onPairingCode, onPairingSuccess }) {
|
|
@@ -239,7 +239,7 @@ export default class Clover {
|
|
|
239
239
|
const requestExternalId = this.pendingSaleRequest.getExternalId();
|
|
240
240
|
this.pendingSaleRequest = null; // The sale is complete
|
|
241
241
|
this.saleResponse = response;
|
|
242
|
-
this.paymentResponse =
|
|
242
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
243
243
|
if (response.getSuccess()) {
|
|
244
244
|
const payment = response.getPayment();
|
|
245
245
|
// We are choosing to void the payment if it was not authorized for the full amount.
|
|
@@ -267,7 +267,7 @@ export default class Clover {
|
|
|
267
267
|
const requestExternalId = this.pendingSaleRequest.getExternalId();
|
|
268
268
|
this.pendingSaleRequest = null; // The sale is complete
|
|
269
269
|
this.authResponse = response;
|
|
270
|
-
this.paymentResponse =
|
|
270
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
271
271
|
if (response.getSuccess()) {
|
|
272
272
|
const payment = response.getPayment();
|
|
273
273
|
//auto tip = 0 on auth
|
|
@@ -298,7 +298,10 @@ export default class Clover {
|
|
|
298
298
|
console.log({ message: "Payment response received", response: response });
|
|
299
299
|
this.pendingSaleRequest = null; // The sale is complete
|
|
300
300
|
this.tipAdjustAuthResponse = response;
|
|
301
|
-
this.paymentResponse
|
|
301
|
+
if (this.paymentResponse == null) {
|
|
302
|
+
//Prevent override response auth
|
|
303
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
304
|
+
}
|
|
302
305
|
if (response.getSuccess()) {
|
|
303
306
|
}
|
|
304
307
|
else {
|
|
@@ -309,7 +312,7 @@ export default class Clover {
|
|
|
309
312
|
console.log({ message: "Payment response received", response: response });
|
|
310
313
|
this.pendingSaleRequest = null; // The sale is complete
|
|
311
314
|
this.voidPaymentResponse = response;
|
|
312
|
-
this.paymentResponse =
|
|
315
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
313
316
|
if (response.getSuccess()) {
|
|
314
317
|
}
|
|
315
318
|
else {
|
|
@@ -320,7 +323,7 @@ export default class Clover {
|
|
|
320
323
|
console.log({ message: "Payment response received", response: response });
|
|
321
324
|
this.pendingSaleRequest = null; // The sale is complete
|
|
322
325
|
this.refundPaymentResponse = response;
|
|
323
|
-
this.paymentResponse =
|
|
326
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
324
327
|
if (response.getSuccess()) {
|
|
325
328
|
}
|
|
326
329
|
else {
|
|
@@ -331,7 +334,7 @@ export default class Clover {
|
|
|
331
334
|
console.log({ message: "Payment response received", response: response });
|
|
332
335
|
this.pendingSaleRequest = null; // The sale is complete
|
|
333
336
|
this.closeoutResponse = response;
|
|
334
|
-
this.paymentResponse =
|
|
337
|
+
this.paymentResponse = CloverPaymentResponseModel.build(response);
|
|
335
338
|
if (response.getSuccess()) {
|
|
336
339
|
}
|
|
337
340
|
else {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PaymentInterface } from "../payment/payment_interface";
|
|
2
|
+
import { GapPaymentClientConfiguration } from "../payment/type";
|
|
3
|
+
import { PaymentResponseModel } from "./payment_response_model";
|
|
4
|
+
import { PaymentInput, AdjustInput, VoidInput, RefundInput, RetrieveInput } from "./types";
|
|
5
|
+
export declare class CloverPayment implements PaymentInterface {
|
|
6
|
+
paymentClientConfiguration: GapPaymentClientConfiguration;
|
|
7
|
+
paymentClient: any;
|
|
8
|
+
initializePaymentClient(_client: any): void;
|
|
9
|
+
doAuth(paymentInput: PaymentInput): Promise<PaymentResponseModel>;
|
|
10
|
+
doSale(paymentInput: PaymentInput): Promise<PaymentResponseModel>;
|
|
11
|
+
doAdjust(adjustInput: AdjustInput): Promise<PaymentResponseModel>;
|
|
12
|
+
doVoid(voidInput: VoidInput): Promise<PaymentResponseModel>;
|
|
13
|
+
doRefund(refundInput: RefundInput): Promise<PaymentResponseModel>;
|
|
14
|
+
doBatchClose(): Promise<PaymentResponseModel>;
|
|
15
|
+
doRetrieve(retrieveInput: RetrieveInput): Promise<PaymentResponseModel>;
|
|
16
|
+
cancel(): Promise<boolean>;
|
|
17
|
+
dispose(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=CloverPayment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloverPayment.d.ts","sourceRoot":"","sources":["../../src/clover/CloverPayment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI3F,qBAAa,aAAc,YAAW,gBAAgB;IAClD,0BAA0B,EAAE,6BAA6B,CAAC;IAC1D,aAAa,EAAE,GAAG,CAAC;IACnB,uBAAuB,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAI3C,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMjE,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMjE,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMjE,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAM3D,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMjE,YAAY,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAM7C,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAOvE,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAM1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAM3B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ExecutorHelper } from "../executor/executor_helper";
|
|
2
|
+
import CloverPaymentObject from "./CloverPaymentObject";
|
|
3
|
+
export class CloverPayment {
|
|
4
|
+
initializePaymentClient(_client) {
|
|
5
|
+
this.paymentClient = CloverPaymentObject.getInstance(this.paymentClientConfiguration.configuration);
|
|
6
|
+
this.paymentClient.connect();
|
|
7
|
+
}
|
|
8
|
+
;
|
|
9
|
+
doAuth(paymentInput) {
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
12
|
+
CloverPaymentObject.getInstance().doAuth(paymentInput, callback);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
;
|
|
16
|
+
doSale(paymentInput) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
19
|
+
CloverPaymentObject.getInstance().doSale(paymentInput, callback);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
;
|
|
23
|
+
doAdjust(adjustInput) {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
26
|
+
CloverPaymentObject.getInstance().doTipAdjust(adjustInput, callback);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
;
|
|
30
|
+
doVoid(voidInput) {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
33
|
+
CloverPaymentObject.getInstance().doVoid(voidInput, callback);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
;
|
|
37
|
+
doRefund(refundInput) {
|
|
38
|
+
return new Promise((resolve, reject) => {
|
|
39
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
40
|
+
CloverPaymentObject.getInstance().doRefund(refundInput, callback);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
;
|
|
44
|
+
doBatchClose() {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
47
|
+
CloverPaymentObject.getInstance().doCloseout(callback);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
;
|
|
51
|
+
doRetrieve(retrieveInput) {
|
|
52
|
+
return new Promise((resolve, reject) => {
|
|
53
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
54
|
+
CloverPaymentObject.getInstance().doRetrievePayment(retrieveInput, callback);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
;
|
|
58
|
+
cancel() {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
let callback = ExecutorHelper.getInstance().exec(success => resolve(success), error => reject(error));
|
|
61
|
+
CloverPaymentObject.getInstance().resetDevice(callback);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
dispose() {
|
|
66
|
+
return new Promise((resolve) => {
|
|
67
|
+
CloverPaymentObject.getInstance().cleanup();
|
|
68
|
+
resolve();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
;
|
|
72
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as clover from "@xuantan97/remote-pay-cloud";
|
|
2
|
+
import { Callback } from "../executor/callback";
|
|
3
|
+
import { CloverPaymentResponseModel } from "./clover_payment_response_model";
|
|
4
|
+
import { AdjustInput, PaymentInput, RefundInput, RetrieveInput, VoidInput } from "./types";
|
|
5
|
+
export { clover };
|
|
6
|
+
export default class CloverPaymentObject {
|
|
7
|
+
static instance: CloverPaymentObject | null;
|
|
8
|
+
cloverConnector: clover.remotepay.ICloverConnector | null;
|
|
9
|
+
pairingCode: any;
|
|
10
|
+
authToken: string;
|
|
11
|
+
pendingSaleRequest: any;
|
|
12
|
+
cloverConfig: any;
|
|
13
|
+
cloverConnectionListener: clover.remotepay.ICloverConnectorListener;
|
|
14
|
+
isReady: boolean;
|
|
15
|
+
onPairingCode?: (pairingCode: string) => void;
|
|
16
|
+
onPairingSuccess?: (authToken: string) => void;
|
|
17
|
+
deviceError: clover.remotepay.CloverDeviceErrorEvent | null;
|
|
18
|
+
deviceDisconnected: boolean;
|
|
19
|
+
saleResponse: clover.remotepay.SaleResponse | null;
|
|
20
|
+
authResponse: clover.remotepay.AuthResponse | null;
|
|
21
|
+
tipAdjustAuthResponse: clover.remotepay.TipAdjustAuthResponse | null;
|
|
22
|
+
voidPaymentResponse: clover.remotepay.VoidPaymentResponse | null;
|
|
23
|
+
refundPaymentResponse: clover.remotepay.RefundPaymentResponse | null;
|
|
24
|
+
closeoutResponse: clover.remotepay.CloseoutResponse | null;
|
|
25
|
+
retrievePaymentResponse: clover.remotepay.RetrievePaymentResponse | null;
|
|
26
|
+
retrievePendingPaymentsResponse: clover.remotepay.RetrievePendingPaymentsResponse | null;
|
|
27
|
+
retrieveDeviceStatusResponse: clover.remotepay.RetrieveDeviceStatusResponse | null;
|
|
28
|
+
paymentResponse: CloverPaymentResponseModel | null;
|
|
29
|
+
currentCallback: Callback | null;
|
|
30
|
+
constructor({ cloverConfig, onPairingCode, onPairingSuccess }: {
|
|
31
|
+
cloverConfig: any;
|
|
32
|
+
onPairingCode?: (pairingCode: string) => void;
|
|
33
|
+
onPairingSuccess?: (authToken: string) => void;
|
|
34
|
+
});
|
|
35
|
+
static createInstance(options?: {
|
|
36
|
+
cloverConfig: any;
|
|
37
|
+
onPairingCode?: (pairingCode: string) => void;
|
|
38
|
+
onPairingSuccess?: (authToken: string) => void;
|
|
39
|
+
}): CloverPaymentObject;
|
|
40
|
+
static getInstance(options?: {
|
|
41
|
+
cloverConfig: any;
|
|
42
|
+
onPairingCode?: (pairingCode: string) => void;
|
|
43
|
+
onPairingSuccess?: (authToken: string) => void;
|
|
44
|
+
createNew?: boolean;
|
|
45
|
+
}): CloverPaymentObject;
|
|
46
|
+
connect(): void;
|
|
47
|
+
doSale(paymentInput: PaymentInput, callback: Callback): void;
|
|
48
|
+
doAuth(paymentInput: PaymentInput, callback: Callback): void;
|
|
49
|
+
doTipAdjust(adjustInput: AdjustInput, callback: Callback): void;
|
|
50
|
+
doVoid(voidInput: VoidInput, callback: Callback): void;
|
|
51
|
+
doRefund(refundInput: RefundInput, callback: Callback): void;
|
|
52
|
+
doRetrievePayment(retrieveInput: RetrieveInput, callback: Callback): void;
|
|
53
|
+
doRetrievePendingPayment(): void;
|
|
54
|
+
doCloseout(callback: Callback): void;
|
|
55
|
+
doPrint(printRequest: clover.remotepay.PrintRequest): void;
|
|
56
|
+
cleanup(): void;
|
|
57
|
+
showMessage(message: any): void;
|
|
58
|
+
checkDeviceStatus(): void;
|
|
59
|
+
showWelcomeScreen(): void;
|
|
60
|
+
showThankYouScreen(): void;
|
|
61
|
+
private buildCloverConnectionListener;
|
|
62
|
+
resetDevice(callback?: Callback): void;
|
|
63
|
+
private getDeviceConfigurationForNetwork;
|
|
64
|
+
private checkPaymentStatus;
|
|
65
|
+
private handleSuccessCallback;
|
|
66
|
+
private handleErrorCallback;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=CloverPaymentObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloverPaymentObject.d.ts","sourceRoot":"","sources":["../../src/clover/CloverPaymentObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SA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