@pixelpay/sdk-core 2.3.0-beta.0 → 2.3.1-beta.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/jest.config.js +10 -4
  3. package/lib/base/Helpers.js +17 -28
  4. package/lib/base/Helpers.js.map +1 -1
  5. package/lib/base/RequestBehaviour.js +7 -8
  6. package/lib/base/RequestBehaviour.js.map +1 -1
  7. package/lib/base/Response.js +14 -15
  8. package/lib/base/Response.js.map +1 -1
  9. package/lib/base/ServiceBehaviour.js +67 -144
  10. package/lib/base/ServiceBehaviour.js.map +1 -1
  11. package/lib/browser/index.js +11 -3
  12. package/lib/entities/CardResult.js +10 -11
  13. package/lib/entities/CardResult.js.map +1 -1
  14. package/lib/entities/TransactionResult.js +12 -15
  15. package/lib/entities/TransactionResult.js.map +1 -1
  16. package/lib/exceptions/InvalidCredentialsException.js +2 -22
  17. package/lib/exceptions/InvalidCredentialsException.js.map +1 -1
  18. package/lib/exceptions/InvalidTransactionTypeException.js +2 -22
  19. package/lib/exceptions/InvalidTransactionTypeException.js.map +1 -1
  20. package/lib/exceptions/RunningTransactionException.js +2 -22
  21. package/lib/exceptions/RunningTransactionException.js.map +1 -1
  22. package/lib/index.js +31 -31
  23. package/lib/index.js.map +1 -1
  24. package/lib/libraries/CardinalManager.js +110 -194
  25. package/lib/libraries/CardinalManager.js.map +1 -1
  26. package/lib/libraries/CybersourceManager.js +17 -20
  27. package/lib/libraries/CybersourceManager.js.map +1 -1
  28. package/lib/libraries/PayloadManager.js +22 -44
  29. package/lib/libraries/PayloadManager.js.map +1 -1
  30. package/lib/libraries/PixelPayLoading.js +15 -11
  31. package/lib/libraries/PixelPayLoading.js.map +1 -1
  32. package/lib/libraries/PixelPayModal.js +15 -15
  33. package/lib/libraries/PixelPayModal.js.map +1 -1
  34. package/lib/models/Billing.js +3 -4
  35. package/lib/models/Billing.js.map +1 -1
  36. package/lib/models/Card.js +7 -8
  37. package/lib/models/Card.js.map +1 -1
  38. package/lib/models/Item.js +5 -6
  39. package/lib/models/Item.js.map +1 -1
  40. package/lib/models/Order.js +12 -14
  41. package/lib/models/Order.js.map +1 -1
  42. package/lib/models/Settings.js +17 -18
  43. package/lib/models/Settings.js.map +1 -1
  44. package/lib/requests/AuthTokenization.js +6 -26
  45. package/lib/requests/AuthTokenization.js.map +1 -1
  46. package/lib/requests/AuthTransaction.js +3 -23
  47. package/lib/requests/AuthTransaction.js.map +1 -1
  48. package/lib/requests/CaptureTransaction.js +7 -25
  49. package/lib/requests/CaptureTransaction.js.map +1 -1
  50. package/lib/requests/CardTokenization.js +22 -40
  51. package/lib/requests/CardTokenization.js.map +1 -1
  52. package/lib/requests/LookupContinueTransaction.js +9 -27
  53. package/lib/requests/LookupContinueTransaction.js.map +1 -1
  54. package/lib/requests/LookupTransaction.js +40 -58
  55. package/lib/requests/LookupTransaction.js.map +1 -1
  56. package/lib/requests/PaymentTransaction.js +43 -62
  57. package/lib/requests/PaymentTransaction.js.map +1 -1
  58. package/lib/requests/SaleTransaction.js +13 -31
  59. package/lib/requests/SaleTransaction.js.map +1 -1
  60. package/lib/requests/StatusTransaction.js +6 -24
  61. package/lib/requests/StatusTransaction.js.map +1 -1
  62. package/lib/requests/VoidTransaction.js +8 -26
  63. package/lib/requests/VoidTransaction.js.map +1 -1
  64. package/lib/resources/Environment.js +6 -9
  65. package/lib/resources/Environment.js.map +1 -1
  66. package/lib/resources/Locations.js +6 -6
  67. package/lib/resources/Locations.js.map +1 -1
  68. package/lib/responses/ErrorResponse.js +3 -23
  69. package/lib/responses/ErrorResponse.js.map +1 -1
  70. package/lib/responses/FailureResponse.js +3 -23
  71. package/lib/responses/FailureResponse.js.map +1 -1
  72. package/lib/responses/InputErrorResponse.js +3 -23
  73. package/lib/responses/InputErrorResponse.js.map +1 -1
  74. package/lib/responses/NetworkFailureResponse.js +3 -23
  75. package/lib/responses/NetworkFailureResponse.js.map +1 -1
  76. package/lib/responses/NoAccessResponse.js +3 -23
  77. package/lib/responses/NoAccessResponse.js.map +1 -1
  78. package/lib/responses/NotFoundResponse.js +3 -23
  79. package/lib/responses/NotFoundResponse.js.map +1 -1
  80. package/lib/responses/PayloadResponse.js +3 -23
  81. package/lib/responses/PayloadResponse.js.map +1 -1
  82. package/lib/responses/PaymentDeclinedResponse.js +3 -23
  83. package/lib/responses/PaymentDeclinedResponse.js.map +1 -1
  84. package/lib/responses/PreconditionalResponse.js +3 -23
  85. package/lib/responses/PreconditionalResponse.js.map +1 -1
  86. package/lib/responses/SuccessResponse.js +3 -23
  87. package/lib/responses/SuccessResponse.js.map +1 -1
  88. package/lib/responses/TimeoutResponse.js +3 -23
  89. package/lib/responses/TimeoutResponse.js.map +1 -1
  90. package/lib/services/CardinalAuthentication.js +19 -39
  91. package/lib/services/CardinalAuthentication.js.map +1 -1
  92. package/lib/services/Tokenization.js +58 -157
  93. package/lib/services/Tokenization.js.map +1 -1
  94. package/lib/services/Transaction.js +100 -201
  95. package/lib/services/Transaction.js.map +1 -1
  96. package/lib/version.d.ts +1 -1
  97. package/lib/version.js +1 -1
  98. package/package.json +3 -3
  99. package/tsconfig.json +2 -3
@@ -1,85 +1,68 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
22
- var Helpers_1 = __importDefault(require("../base/Helpers"));
23
- var CardTokenization = /** @class */ (function (_super) {
24
- __extends(CardTokenization, _super);
25
- function CardTokenization() {
26
- var _this = _super !== null && _super.apply(this, arguments) || this;
6
+ const RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
7
+ const Helpers_1 = __importDefault(require("../base/Helpers"));
8
+ class CardTokenization extends RequestBehaviour_1.default {
9
+ constructor() {
10
+ super(...arguments);
27
11
  /**
28
12
  * Card number or PAN
29
13
  */
30
- _this.number = null;
14
+ this.number = null;
31
15
  /**
32
16
  * Card security code
33
17
  */
34
- _this.cvv2 = null;
18
+ this.cvv2 = null;
35
19
  /**
36
20
  * Card expire month date (MM)
37
21
  */
38
- _this.expire_month = null;
22
+ this.expire_month = null;
39
23
  /**
40
24
  * Card expire year date (YYYY)
41
25
  */
42
- _this.expire_year = null;
26
+ this.expire_year = null;
43
27
  /**
44
28
  * Cardholder name
45
29
  */
46
- _this.cardholder = null;
30
+ this.cardholder = null;
47
31
  /**
48
32
  * Customer billing address
49
33
  */
50
- _this.address = null;
34
+ this.address = null;
51
35
  /**
52
36
  * Customer billing country alpha-2 code (ISO 3166-1)
53
37
  */
54
- _this.country = null;
38
+ this.country = null;
55
39
  /**
56
40
  * Customer billing state alpha code (ISO 3166-2)
57
41
  */
58
- _this.state = null;
42
+ this.state = null;
59
43
  /**
60
44
  * Customer billing city
61
45
  */
62
- _this.city = null;
46
+ this.city = null;
63
47
  /**
64
48
  * Customer billing postal code
65
49
  */
66
- _this.zip = null;
50
+ this.zip = null;
67
51
  /**
68
52
  * Customer billing phone
69
53
  */
70
- _this.phone = null;
54
+ this.phone = null;
71
55
  /**
72
56
  * Customer email
73
57
  */
74
- _this.email = null;
75
- return _this;
58
+ this.email = null;
76
59
  }
77
60
  /**
78
61
  * Associate and mapping Card model properties to transaction
79
62
  *
80
63
  * @param card
81
64
  */
82
- CardTokenization.prototype.setCard = function (card) {
65
+ setCard(card) {
83
66
  this.number = Helpers_1.default.cleanString(card.number);
84
67
  this.cvv2 = card.cvv2;
85
68
  this.cardholder = Helpers_1.default.trimValue(card.cardholder);
@@ -89,21 +72,20 @@ var CardTokenization = /** @class */ (function (_super) {
89
72
  if (card.expire_year) {
90
73
  this.expire_year = String(card.expire_year);
91
74
  }
92
- };
75
+ }
93
76
  /**
94
77
  * Associate and mapping Billing model properties to transaction
95
78
  *
96
79
  * @param billing
97
80
  */
98
- CardTokenization.prototype.setBilling = function (billing) {
81
+ setBilling(billing) {
99
82
  this.address = Helpers_1.default.trimValue(billing.address);
100
83
  this.country = billing.country;
101
84
  this.state = billing.state;
102
85
  this.city = Helpers_1.default.trimValue(billing.city);
103
86
  this.zip = billing.zip;
104
87
  this.phone = billing.phone;
105
- };
106
- return CardTokenization;
107
- }(RequestBehaviour_1.default));
88
+ }
89
+ }
108
90
  exports.default = CardTokenization;
109
91
  //# sourceMappingURL=CardTokenization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardTokenization.js","sourceRoot":"","sources":["../../src/requests/CardTokenization.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8EAAwD;AACxD,4DAAsC;AAItC;IAA8C,oCAAgB;IAA9D;QAAA,qEA6FC;QA5FA;;WAEG;QACH,YAAM,GAAW,IAAI,CAAC;QAEtB;;WAEG;QACH,UAAI,GAAW,IAAI,CAAC;QAEpB;;WAEG;QACH,kBAAY,GAAW,IAAI,CAAC;QAE5B;;WAEG;QACH,iBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,gBAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,aAAO,GAAW,IAAI,CAAC;QAEvB;;WAEG;QACH,aAAO,GAAW,IAAI,CAAC;QAEvB;;WAEG;QACH,WAAK,GAAW,IAAI,CAAC;QAErB;;WAEG;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IACF,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,iBAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,CAAC;CACD;AA7FD,mCA6FC"}
@@ -1,47 +1,29 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
22
- var LookupContinueTransaction = /** @class */ (function (_super) {
23
- __extends(LookupContinueTransaction, _super);
24
- function LookupContinueTransaction() {
25
- var _this = _super !== null && _super.apply(this, arguments) || this;
6
+ const RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
7
+ class LookupContinueTransaction extends RequestBehaviour_1.default {
8
+ constructor() {
9
+ super(...arguments);
26
10
  /**
27
11
  * Cardinal transaction indentifier
28
12
  */
29
- _this.identifier = null;
13
+ this.identifier = null;
30
14
  /**
31
15
  * Cardinal Validation JWT payload
32
16
  */
33
- _this.payload = null;
17
+ this.payload = null;
34
18
  /**
35
19
  * Tokenized card identifier (T-* format)
36
20
  */
37
- _this.card_token = null;
21
+ this.card_token = null;
38
22
  /**
39
23
  * Cardinal authentication flag for tokenization
40
24
  */
41
- _this.authenticate_token = false;
42
- return _this;
25
+ this.authenticate_token = false;
43
26
  }
44
- return LookupContinueTransaction;
45
- }(RequestBehaviour_1.default));
27
+ }
46
28
  exports.default = LookupContinueTransaction;
47
29
  //# sourceMappingURL=LookupContinueTransaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LookupContinueTransaction.js","sourceRoot":"","sources":["../../src/requests/LookupContinueTransaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8EAAwD;AAExD;IAAuD,6CAAgB;IAAvE;QAAA,qEAoBC;QAnBA;;WAEG;QACH,gBAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,aAAO,GAAW,IAAI,CAAC;QAEvB;;WAEG;QACH,gBAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,wBAAkB,GAAY,KAAK,CAAC;;IACrC,CAAC;IAAD,gCAAC;AAAD,CAAC,AApBD,CAAuD,0BAAgB,GAoBtE"}
1
+ {"version":3,"file":"LookupContinueTransaction.js","sourceRoot":"","sources":["../../src/requests/LookupContinueTransaction.ts"],"names":[],"mappings":";;;;;AAAA,gFAAwD;AAExD,MAAqB,yBAA0B,SAAQ,0BAAgB;IAAvE;;QACC;;WAEG;QACH,eAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,YAAO,GAAW,IAAI,CAAC;QAEvB;;WAEG;QACH,eAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,uBAAkB,GAAY,KAAK,CAAC;IACrC,CAAC;CAAA;AApBD,4CAoBC"}
@@ -1,152 +1,135 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
22
- var AuthTokenization_1 = __importDefault(require("./AuthTokenization"));
23
- var SaleTransaction_1 = __importDefault(require("./SaleTransaction"));
24
- var LookupTransaction = /** @class */ (function (_super) {
25
- __extends(LookupTransaction, _super);
26
- function LookupTransaction() {
27
- var _this = _super !== null && _super.apply(this, arguments) || this;
6
+ const RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
7
+ const AuthTokenization_1 = __importDefault(require("./AuthTokenization"));
8
+ const SaleTransaction_1 = __importDefault(require("./SaleTransaction"));
9
+ class LookupTransaction extends RequestBehaviour_1.default {
10
+ constructor() {
11
+ super(...arguments);
28
12
  /**
29
13
  * Tokenized card identifier (T-* format)
30
14
  */
31
- _this.card_token = null;
15
+ this.card_token = null;
32
16
  /**
33
17
  * Card number or PAN
34
18
  */
35
- _this.card_number = null;
19
+ this.card_number = null;
36
20
  /**
37
21
  * Card expire year/month date (YYMM)
38
22
  */
39
- _this.card_expire = null;
23
+ this.card_expire = null;
40
24
  /**
41
25
  * Customer billing address
42
26
  */
43
- _this.billing_address = null;
27
+ this.billing_address = null;
44
28
  /**
45
29
  * Customer billing country alpha-2 code (ISO 3166-1)
46
30
  */
47
- _this.billing_country = null;
31
+ this.billing_country = null;
48
32
  /**
49
33
  * Customer billing state alpha code (ISO 3166-2)
50
34
  */
51
- _this.billing_state = null;
35
+ this.billing_state = null;
52
36
  /**
53
37
  * Customer billing city
54
38
  */
55
- _this.billing_city = null;
39
+ this.billing_city = null;
56
40
  /**
57
41
  * Customer billing postal code
58
42
  */
59
- _this.billing_zip = null;
43
+ this.billing_zip = null;
60
44
  /**
61
45
  * Customer billing phone
62
46
  */
63
- _this.billing_phone = null;
47
+ this.billing_phone = null;
64
48
  /**
65
49
  * Order customer name
66
50
  */
67
- _this.customer_name = null;
51
+ this.customer_name = null;
68
52
  /**
69
53
  * Order customer email
70
54
  */
71
- _this.customer_email = null;
55
+ this.customer_email = null;
72
56
  /**
73
57
  * Order ID
74
58
  */
75
- _this.order_id = null;
59
+ this.order_id = null;
76
60
  /**
77
61
  * Order currency code alpha-3
78
62
  */
79
- _this.order_currency = null;
63
+ this.order_currency = null;
80
64
  /**
81
65
  * Order total amount
82
66
  */
83
- _this.order_amount = null;
67
+ this.order_amount = null;
84
68
  /**
85
69
  * Indicates the maximum number of authorizations for installment payments.
86
70
  */
87
- _this.installment = null;
71
+ this.installment = null;
88
72
  /**
89
73
  * Secure payload for transactions
90
74
  */
91
- _this.secure_payload = null;
75
+ this.secure_payload = null;
92
76
  /**
93
77
  * Cardinal session reference
94
78
  */
95
- _this.reference = null;
79
+ this.reference = null;
96
80
  /**
97
81
  * Ability of the cardholder browser to execute Java.
98
82
  */
99
- _this.browser_java_enabled = 'false';
83
+ this.browser_java_enabled = 'false';
100
84
  /**
101
85
  * Exact content of the HTTP accept headers sent from the cardholder's browser.
102
86
  */
103
- _this.browser_header = null;
87
+ this.browser_header = null;
104
88
  /**
105
89
  * Browser language as defined in IETF BCP47 .
106
90
  */
107
- _this.browser_language = null;
91
+ this.browser_language = null;
108
92
  /**
109
93
  * The bit depth of the color palette for displaying images, in bits per pixel
110
94
  */
111
- _this.browser_color_depth = null;
95
+ this.browser_color_depth = null;
112
96
  /**
113
97
  * Total height of the Cardholder's scree in pixels
114
98
  */
115
- _this.browser_screen_height = null;
99
+ this.browser_screen_height = null;
116
100
  /**
117
101
  * Total width of the Cardholder's scree in pixels
118
102
  */
119
- _this.browser_screen_width = null;
103
+ this.browser_screen_width = null;
120
104
  /**
121
105
  * Time difference between UTC time and the cardholder browser local time, in minutes
122
106
  */
123
- _this.browser_time_zone = null;
107
+ this.browser_time_zone = null;
124
108
  /**
125
109
  * The exact content of the HTTP user agent header.
126
110
  */
127
- _this.user_agent = null;
111
+ this.user_agent = null;
128
112
  /**
129
113
  * The IP address of the Consumer.
130
114
  */
131
- _this.ip_address = null;
115
+ this.ip_address = null;
132
116
  /**
133
117
  * Cardinal device channel (SDK or Browser)
134
118
  */
135
- _this.device_channel = 'Browser';
119
+ this.device_channel = 'Browser';
136
120
  /**
137
121
  * Ability of the cardholder browser to execute JavaScript.
138
122
  */
139
- _this.browser_javascript_enabled = 'true';
123
+ this.browser_javascript_enabled = 'true';
140
124
  /**
141
125
  * Cardinal authentication flag for tokenization
142
126
  */
143
- _this.authenticate_token = false;
144
- return _this;
127
+ this.authenticate_token = false;
145
128
  }
146
129
  /**
147
130
  * Cast PaymentTransaction to LookupTransaction
148
131
  */
149
- LookupTransaction.prototype.fromPaymentTransaction = function (request) {
132
+ fromPaymentTransaction(request) {
150
133
  this.card_token = request.card_token;
151
134
  this.card_number = request.card_number;
152
135
  this.card_expire = request.card_expire;
@@ -166,11 +149,11 @@ var LookupTransaction = /** @class */ (function (_super) {
166
149
  if (request instanceof SaleTransaction_1.default) {
167
150
  this.installment = request.installment_months;
168
151
  }
169
- };
152
+ }
170
153
  /**
171
154
  * Check if required EMV fields were included by songbird. If not, they are added manually.
172
155
  */
173
- LookupTransaction.prototype.setRequiredEMVFields = function () {
156
+ setRequiredEMVFields() {
174
157
  if (!this.browser_java_enabled) {
175
158
  this.browser_java_enabled = typeof navigator.javaEnabled === "function"
176
159
  ? navigator.javaEnabled().toString()
@@ -194,8 +177,7 @@ var LookupTransaction = /** @class */ (function (_super) {
194
177
  if (!this.user_agent) {
195
178
  this.user_agent = navigator.userAgent;
196
179
  }
197
- };
198
- return LookupTransaction;
199
- }(RequestBehaviour_1.default));
180
+ }
181
+ }
200
182
  exports.default = LookupTransaction;
201
183
  //# sourceMappingURL=LookupTransaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LookupTransaction.js","sourceRoot":"","sources":["../../src/requests/LookupTransaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8EAAwD;AAExD,wEAAkD;AAClD,sEAAgD;AAEhD;IAA+C,qCAAgB;IAA/D;QAAA,qEAmNC;QAlNA;;WAEG;QACH,gBAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,iBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,iBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,qBAAe,GAAW,IAAI,CAAC;QAE/B;;WAEG;QACH,qBAAe,GAAW,IAAI,CAAC;QAE/B;;WAEG;QACH,mBAAa,GAAW,IAAI,CAAC;QAE7B;;WAEG;QACH,kBAAY,GAAW,IAAI,CAAC;QAE5B;;WAEG;QACH,iBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,mBAAa,GAAW,IAAI,CAAC;QAE7B;;WAEG;QACH,mBAAa,GAAW,IAAI,CAAC;QAE7B;;WAEG;QACH,oBAAc,GAAW,IAAI,CAAC;QAE9B;;WAEG;QACH,cAAQ,GAAW,IAAI,CAAC;QAExB;;WAEG;QACH,oBAAc,GAAW,IAAI,CAAC;QAE9B;;WAEG;QACH,kBAAY,GAAW,IAAI,CAAC;QAE5B;;WAEG;QACH,iBAAW,GAAW,IAAI,CAAC;QAE3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