gap-nodejs-sdk 1.0.183 → 1.0.185

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.
@@ -1 +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,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElG,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACpC,MAAM,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAQ;IACjE,WAAW,EAAE,GAAG,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAIlB,kBAAkB,EAAE,GAAG,CAAQ;IAC/B,YAAY,EAAE,GAAG,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC;IACpE,OAAO,EAAE,OAAO,CAAS;IAEzB,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAQ;IACnE,kBAAkB,EAAE,OAAO,CAAQ;IAEnC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAQ;IAC1D,YAAY,EAAE,MAAM,C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IjB,kBAAkB;IAIlB,kBAAkB,CAAC,KAAK,EAAE,KAAK;IAmB/B,oBAAoB,CAAC,KAAK,EAAE,KAAK;IAiBjC,cAAc;IAMd,OAAO,CAAC,6BAA6B;IAoNrC,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI;IAetC,OAAO,CAAC,gCAAgC;IA4BxC,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,mBAAmB;CAO9B"}
@@ -91,7 +91,7 @@ export default class CloverPaymentObject {
91
91
  }
92
92
  this.saleCallback = callback;
93
93
  console.log({ message: "Sending sale", request: this.pendingSaleRequest });
94
- console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress.`);
94
+ // console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress.`);
95
95
  // Send the sale to the device.
96
96
  (_a = this.cloverConnector) === null || _a === void 0 ? void 0 : _a.sale(this.pendingSaleRequest);
97
97
  }
@@ -116,7 +116,7 @@ export default class CloverPaymentObject {
116
116
  this.pendingSaleRequest.setTippableAmount(paymentInput.tippableAmount);
117
117
  }
118
118
  console.log({ message: "Sending auth", request: this.pendingSaleRequest });
119
- console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress.`);
119
+ // console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress.`);
120
120
  // Send the auth to the device.
121
121
  (_a = this.cloverConnector) === null || _a === void 0 ? void 0 : _a.auth(this.pendingSaleRequest);
122
122
  }
@@ -186,17 +186,12 @@ export default class CloverPaymentObject {
186
186
  this.retrievePaymentResponse = null;
187
187
  this.paymentResponse = null;
188
188
  this.retrievePaymentCallback = callback;
189
- if (!this.pendingSaleRequest) {
190
- this.pendingSaleRequest = new clover.remotepay.RetrievePaymentRequest();
191
- this.pendingSaleRequest.setExternalId(retrieveInput.refId);
192
- console.log({ message: "Sending retrieve", request: this.pendingSaleRequest });
193
- console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} is in progress.`);
194
- // Send the retrieve to the device.
195
- (_a = this.cloverConnector) === null || _a === void 0 ? void 0 : _a.retrievePayment(this.pendingSaleRequest);
196
- }
197
- else {
198
- this.checkPaymentStatus();
199
- }
189
+ this.pendingSaleRequest = new clover.remotepay.RetrievePaymentRequest();
190
+ this.pendingSaleRequest.setExternalId(retrieveInput.refId);
191
+ console.log({ message: "Sending retrieve", request: this.pendingSaleRequest });
192
+ console.log(`Payment: ${this.pendingSaleRequest.getExternalId()} is in progress.`);
193
+ // Send the retrieve to the device.
194
+ (_a = this.cloverConnector) === null || _a === void 0 ? void 0 : _a.retrievePayment(this.pendingSaleRequest);
200
195
  }
201
196
  doRetrievePendingPayment() {
202
197
  var _a;
@@ -304,7 +299,7 @@ export default class CloverPaymentObject {
304
299
  var _a;
305
300
  console.log({ message: "Payment response received", response: response });
306
301
  const requestAmount = this.pendingSaleRequest.getAmount();
307
- const requestExternalId = this.pendingSaleRequest.getExternalId();
302
+ // const requestExternalId = this.pendingSaleRequest.getExternalId();
308
303
  this.pendingSaleRequest = null; // The sale is complete
309
304
  this.saleResponse = response;
310
305
  this.paymentResponse = CloverPaymentResponseModel.build(response);
@@ -333,7 +328,7 @@ export default class CloverPaymentObject {
333
328
  var _a, _b;
334
329
  console.log({ message: "Payment response received", response: response });
335
330
  const requestAmount = this.pendingSaleRequest.getAmount();
336
- const requestExternalId = this.pendingSaleRequest.getExternalId();
331
+ // const requestExternalId = this.pendingSaleRequest.getExternalId();
337
332
  this.pendingSaleRequest = null; // The sale is complete
338
333
  this.authResponse = response;
339
334
  this.paymentResponse = CloverPaymentResponseModel.build(response);
@@ -354,7 +349,8 @@ export default class CloverPaymentObject {
354
349
  (_b = this.cloverConnector) === null || _b === void 0 ? void 0 : _b.voidPayment(voidPaymentRequest);
355
350
  }
356
351
  else {
357
- console.log(`${payment.getResult()}: Payment ${payment.getExternalPaymentId()} for $${payment.getAmount() / 100} is complete.`, response.getResult() === clover.remotepay.ResponseCode.SUCCESS);
352
+ // console.log(`${payment.getResult()}: Payment ${payment.getExternalPaymentId()} for $${payment.getAmount() / 100} is complete.`, response.getResult() === clover.remotepay.ResponseCode.SUCCESS);
353
+ console.log(response);
358
354
  if (!response.getIsAuth()) {
359
355
  console.log({ error: "Response is not a auth!" });
360
356
  }
@@ -415,38 +411,42 @@ export default class CloverPaymentObject {
415
411
  //clover.remotepay.ResultStatus.SUCCESS
416
412
  onRetrievePaymentResponse: (retrievePaymentResponse) => {
417
413
  console.log({ message: "onRetrievePaymentResponse", response: retrievePaymentResponse });
418
- if (this.pendingSaleRequest) {
419
- if (retrievePaymentResponse.getExternalPaymentId() === this.pendingSaleRequest.getExternalId()) {
420
- if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.FOUND) {
421
- // The payment's status can be used to resolve the payment in your POS.
422
- const payment = retrievePaymentResponse.getPayment();
423
- this.retrievePaymentCallback = this.handleSuccessCallback(payment, this.retrievePaymentCallback);
424
- console.log(`${payment.getResult()}: Payment ${this.pendingSaleRequest.getExternalId()} is complete.`, payment.getResult() === clover.payments.Result.SUCCESS);
425
- this.pendingSaleRequest = null; // The pending sale is complete.
426
- }
427
- else if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.IN_PROGRESS) {
428
- // payment either not found or in progress,
429
- let message = `Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress. If you would like to start a new payment, you may reset the device. However, doing so may void payment ${this.pendingSaleRequest.getExternalId()}.`;
430
- this.retrievePaymentCallback = this.handleErrorCallback(message, this.retrievePaymentCallback);
431
- console.log();
432
- }
433
- else if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.NOT_FOUND) {
434
- let message = `Payment: ${this.pendingSaleRequest.getExternalId()} wasn't taken or was voided.`;
435
- this.retrievePaymentCallback = this.handleErrorCallback(message, this.retrievePaymentCallback);
436
- }
414
+ // if (this.pendingSaleRequest) {
415
+ // if (retrievePaymentResponse.getExternalPaymentId() === this.pendingSaleRequest.getExternalId()) {
416
+ if (retrievePaymentResponse.getSuccess()) {
417
+ if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.FOUND) {
418
+ // The payment's status can be used to resolve the payment in your POS.
419
+ const payment = retrievePaymentResponse.getPayment();
420
+ this.retrievePaymentCallback = this.handleSuccessCallback(payment, this.retrievePaymentCallback);
421
+ // console.log(`${payment.getResult()}: Payment ${this.pendingSaleRequest.getExternalId()} is complete.`, payment.getResult() === clover.payments.Result.SUCCESS);
422
+ this.pendingSaleRequest = null; // The pending sale is complete.
423
+ }
424
+ else if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.IN_PROGRESS) {
425
+ // payment either not found or in progress,
426
+ // let message = `Payment: ${this.pendingSaleRequest.getExternalId()} for $${this.pendingSaleRequest.getAmount() / 100} is in progress. If you would like to start a new payment, you may reset the device. However, doing so may void payment ${this.pendingSaleRequest.getExternalId()}.`;
427
+ let message = "Payment is in progress! If you would like to start a new payment, you may reset the device. However, doing so may void current payment";
428
+ this.retrievePaymentCallback = this.handleErrorCallback(message, this.retrievePaymentCallback);
429
+ }
430
+ else if (retrievePaymentResponse.getQueryStatus() === clover.remotepay.QueryStatus.NOT_FOUND) {
431
+ let message = `Payment wasn't taken or was voided.`;
432
+ this.retrievePaymentCallback = this.handleErrorCallback(message, this.retrievePaymentCallback);
437
433
  }
438
434
  }
435
+ else {
436
+ this.resetDevice();
437
+ }
438
+ // }
439
+ // }
439
440
  },
440
441
  onResetDeviceResponse: (resetDeviceResponse) => {
441
- var _a;
442
442
  console.log(resetDeviceResponse);
443
443
  this.resetDeviceCallback = this.handleSuccessCallback(true, this.resetDeviceCallback);
444
- if (this.pendingSaleRequest) {
445
- // Verify the payment status, the reset will generally void payments, but not in all cases.
446
- const retrievePaymentRequest = new clover.remotepay.RetrievePaymentRequest();
447
- retrievePaymentRequest.setExternalPaymentId(this.pendingSaleRequest.getExternalId());
448
- (_a = this.cloverConnector) === null || _a === void 0 ? void 0 : _a.retrievePayment(retrievePaymentRequest);
449
- }
444
+ // if (this.pendingSaleRequest) {
445
+ // // Verify the payment status, the reset will generally void payments, but not in all cases.
446
+ // const retrievePaymentRequest = new clover.remotepay.RetrievePaymentRequest();
447
+ // retrievePaymentRequest.setExternalPaymentId(this.pendingSaleRequest.getExternalId());
448
+ // this.cloverConnector?.retrievePayment(retrievePaymentRequest);
449
+ // }
450
450
  },
451
451
  // See https://docs.clover.com/build/working-with-challenges/
452
452
  onConfirmPaymentRequest: (request) => {
@@ -528,7 +528,7 @@ export default class CloverPaymentObject {
528
528
  }
529
529
  checkPaymentStatus() {
530
530
  var _a, _b;
531
- if (this.pendingSaleRequest) {
531
+ if (this.pendingSaleRequest && typeof this.pendingSaleRequest.getExternalId === "function") {
532
532
  // If a message was lost etc. the retrieveDevice status request will ask the device to send the last message.
533
533
  // This can help the POS recover if the device is stuck on a challenge screen, etc. The last message will
534
534
  // be sent independently of the retrieveDeviceStatus response and thus the retrieveDeviceStatus response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gap-nodejs-sdk",
3
- "version": "1.0.183",
3
+ "version": "1.0.185",
4
4
  "description": "GCI App Platform Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",