rerobe-js-orm 4.0.6 → 4.0.7
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/lib/helpers/OrderHelpers.js +18 -11
- package/package.json +1 -1
|
@@ -493,7 +493,7 @@ class OrderHelpers {
|
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
495
|
getPaymentTerminalReceiptInfo(payload) {
|
|
496
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
|
|
496
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51;
|
|
497
497
|
let aid = '';
|
|
498
498
|
let tvr = '';
|
|
499
499
|
let authorizationCode = '';
|
|
@@ -513,17 +513,24 @@ class OrderHelpers {
|
|
|
513
513
|
referenceNumber = (_s = (_r = payload.zettleTransactionObj) === null || _r === void 0 ? void 0 : _r.referenceNumber) !== null && _s !== void 0 ? _s : '';
|
|
514
514
|
}
|
|
515
515
|
else if (payload === null || payload === void 0 ? void 0 : payload.paymentIntentObj) {
|
|
516
|
-
const charge = (_t = payload.paymentIntentObj.charges) === null || _t === void 0 ? void 0 : _t[0];
|
|
517
|
-
aid =
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
516
|
+
const charge = (_u = (_t = payload.paymentIntentObj.charges) === null || _t === void 0 ? void 0 : _t[0]) !== null && _u !== void 0 ? _u : (_w = (_v = payload.charges) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w[0];
|
|
517
|
+
aid =
|
|
518
|
+
(_4 = (_0 = (_z = (_y = (_x = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _x === void 0 ? void 0 : _x.cardPresentDetails) === null || _y === void 0 ? void 0 : _y.receipt) === null || _z === void 0 ? void 0 : _z.dedicatedFileName) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _1 === void 0 ? void 0 : _1.card_present) === null || _2 === void 0 ? void 0 : _2.receipt) === null || _3 === void 0 ? void 0 : _3.dedicated_file_name) !== null && _4 !== void 0 ? _4 : '';
|
|
519
|
+
tvr =
|
|
520
|
+
(_12 = (_8 = (_7 = (_6 = (_5 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _5 === void 0 ? void 0 : _5.cardPresentDetails) === null || _6 === void 0 ? void 0 : _6.receipt) === null || _7 === void 0 ? void 0 : _7.terminalVerificationResults) !== null && _8 !== void 0 ? _8 : (_11 = (_10 = (_9 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _9 === void 0 ? void 0 : _9.card_present) === null || _10 === void 0 ? void 0 : _10.receipt) === null || _11 === void 0 ? void 0 : _11.terminal_verification_results) !== null && _12 !== void 0 ? _12 : '';
|
|
521
|
+
authorizationCode =
|
|
522
|
+
(_20 = (_16 = (_15 = (_14 = (_13 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _13 === void 0 ? void 0 : _13.cardPresentDetails) === null || _14 === void 0 ? void 0 : _14.receipt) === null || _15 === void 0 ? void 0 : _15.authorizationCode) !== null && _16 !== void 0 ? _16 : (_19 = (_18 = (_17 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _17 === void 0 ? void 0 : _17.card_present) === null || _18 === void 0 ? void 0 : _18.receipt) === null || _19 === void 0 ? void 0 : _19.authorization_code) !== null && _20 !== void 0 ? _20 : '';
|
|
523
|
+
entryMode =
|
|
524
|
+
(_26 = (_23 = (_22 = (_21 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _21 === void 0 ? void 0 : _21.cardPresentDetails) === null || _22 === void 0 ? void 0 : _22.readMethod) !== null && _23 !== void 0 ? _23 : (_25 = (_24 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _24 === void 0 ? void 0 : _24.card_present) === null || _25 === void 0 ? void 0 : _25.read_method) !== null && _26 !== void 0 ? _26 : '';
|
|
521
525
|
applicationName =
|
|
522
|
-
(
|
|
523
|
-
((
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
526
|
+
(_38 = (_32 = (((_29 = (_28 = (_27 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _27 === void 0 ? void 0 : _27.cardPresentDetails) === null || _28 === void 0 ? void 0 : _28.receipt) === null || _29 === void 0 ? void 0 : _29.applicationPreferredName) ||
|
|
527
|
+
((_31 = (_30 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _30 === void 0 ? void 0 : _30.cardPresentDetails) === null || _31 === void 0 ? void 0 : _31.brand))) !== null && _32 !== void 0 ? _32 : (((_35 = (_34 = (_33 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _33 === void 0 ? void 0 : _33.card_present) === null || _34 === void 0 ? void 0 : _34.receipt) === null || _35 === void 0 ? void 0 : _35.application_preferred_name) ||
|
|
528
|
+
((_37 = (_36 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _36 === void 0 ? void 0 : _36.card_present) === null || _37 === void 0 ? void 0 : _37.brand))) !== null && _38 !== void 0 ? _38 : '';
|
|
529
|
+
cardBrand =
|
|
530
|
+
(_44 = (_41 = (_40 = (_39 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _39 === void 0 ? void 0 : _39.cardPresentDetails) === null || _40 === void 0 ? void 0 : _40.brand) !== null && _41 !== void 0 ? _41 : (_43 = (_42 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _42 === void 0 ? void 0 : _42.card_present) === null || _43 === void 0 ? void 0 : _43.brand) !== null && _44 !== void 0 ? _44 : '';
|
|
531
|
+
lastFour =
|
|
532
|
+
(_50 = (_47 = (_46 = (_45 = charge === null || charge === void 0 ? void 0 : charge.paymentMethodDetails) === null || _45 === void 0 ? void 0 : _45.cardPresentDetails) === null || _46 === void 0 ? void 0 : _46.last4) !== null && _47 !== void 0 ? _47 : (_49 = (_48 = charge === null || charge === void 0 ? void 0 : charge.payment_method_details) === null || _48 === void 0 ? void 0 : _48.card_present) === null || _49 === void 0 ? void 0 : _49.last4) !== null && _50 !== void 0 ? _50 : '';
|
|
533
|
+
referenceNumber = (_51 = charge === null || charge === void 0 ? void 0 : charge.id) !== null && _51 !== void 0 ? _51 : '';
|
|
527
534
|
}
|
|
528
535
|
return {
|
|
529
536
|
aid,
|