@pixelpay/sdk-core 2.3.0-beta.1 → 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.
- package/CHANGELOG.md +5 -0
- package/jest.config.js +10 -4
- package/lib/base/Helpers.js +17 -28
- package/lib/base/Helpers.js.map +1 -1
- package/lib/base/RequestBehaviour.js +7 -8
- package/lib/base/RequestBehaviour.js.map +1 -1
- package/lib/base/Response.js +14 -15
- package/lib/base/Response.js.map +1 -1
- package/lib/base/ServiceBehaviour.js +67 -144
- package/lib/base/ServiceBehaviour.js.map +1 -1
- package/lib/browser/index.js +11 -3
- package/lib/entities/CardResult.js +10 -11
- package/lib/entities/CardResult.js.map +1 -1
- package/lib/entities/TransactionResult.js +12 -13
- package/lib/entities/TransactionResult.js.map +1 -1
- package/lib/exceptions/InvalidCredentialsException.js +2 -22
- package/lib/exceptions/InvalidCredentialsException.js.map +1 -1
- package/lib/exceptions/InvalidTransactionTypeException.js +2 -22
- package/lib/exceptions/InvalidTransactionTypeException.js.map +1 -1
- package/lib/exceptions/RunningTransactionException.js +2 -22
- package/lib/exceptions/RunningTransactionException.js.map +1 -1
- package/lib/index.js +31 -31
- package/lib/index.js.map +1 -1
- package/lib/libraries/CardinalManager.js +110 -194
- package/lib/libraries/CardinalManager.js.map +1 -1
- package/lib/libraries/CybersourceManager.js +17 -20
- package/lib/libraries/CybersourceManager.js.map +1 -1
- package/lib/libraries/PayloadManager.js +22 -44
- package/lib/libraries/PayloadManager.js.map +1 -1
- package/lib/libraries/PixelPayLoading.js +15 -11
- package/lib/libraries/PixelPayLoading.js.map +1 -1
- package/lib/libraries/PixelPayModal.js +15 -15
- package/lib/libraries/PixelPayModal.js.map +1 -1
- package/lib/models/Billing.js +3 -4
- package/lib/models/Billing.js.map +1 -1
- package/lib/models/Card.js +7 -8
- package/lib/models/Card.js.map +1 -1
- package/lib/models/Item.js +5 -6
- package/lib/models/Item.js.map +1 -1
- package/lib/models/Order.js +12 -14
- package/lib/models/Order.js.map +1 -1
- package/lib/models/Settings.js +17 -18
- package/lib/models/Settings.js.map +1 -1
- package/lib/requests/AuthTokenization.js +6 -26
- package/lib/requests/AuthTokenization.js.map +1 -1
- package/lib/requests/AuthTransaction.js +3 -23
- package/lib/requests/AuthTransaction.js.map +1 -1
- package/lib/requests/CaptureTransaction.js +7 -25
- package/lib/requests/CaptureTransaction.js.map +1 -1
- package/lib/requests/CardTokenization.js +22 -40
- package/lib/requests/CardTokenization.js.map +1 -1
- package/lib/requests/LookupContinueTransaction.js +9 -27
- package/lib/requests/LookupContinueTransaction.js.map +1 -1
- package/lib/requests/LookupTransaction.js +40 -58
- package/lib/requests/LookupTransaction.js.map +1 -1
- package/lib/requests/PaymentTransaction.js +43 -62
- package/lib/requests/PaymentTransaction.js.map +1 -1
- package/lib/requests/SaleTransaction.js +13 -31
- package/lib/requests/SaleTransaction.js.map +1 -1
- package/lib/requests/StatusTransaction.js +6 -24
- package/lib/requests/StatusTransaction.js.map +1 -1
- package/lib/requests/VoidTransaction.js +8 -26
- package/lib/requests/VoidTransaction.js.map +1 -1
- package/lib/resources/Environment.js +6 -9
- package/lib/resources/Environment.js.map +1 -1
- package/lib/resources/Locations.js +6 -6
- package/lib/resources/Locations.js.map +1 -1
- package/lib/responses/ErrorResponse.js +3 -23
- package/lib/responses/ErrorResponse.js.map +1 -1
- package/lib/responses/FailureResponse.js +3 -23
- package/lib/responses/FailureResponse.js.map +1 -1
- package/lib/responses/InputErrorResponse.js +3 -23
- package/lib/responses/InputErrorResponse.js.map +1 -1
- package/lib/responses/NetworkFailureResponse.js +3 -23
- package/lib/responses/NetworkFailureResponse.js.map +1 -1
- package/lib/responses/NoAccessResponse.js +3 -23
- package/lib/responses/NoAccessResponse.js.map +1 -1
- package/lib/responses/NotFoundResponse.js +3 -23
- package/lib/responses/NotFoundResponse.js.map +1 -1
- package/lib/responses/PayloadResponse.js +3 -23
- package/lib/responses/PayloadResponse.js.map +1 -1
- package/lib/responses/PaymentDeclinedResponse.js +3 -23
- package/lib/responses/PaymentDeclinedResponse.js.map +1 -1
- package/lib/responses/PreconditionalResponse.js +3 -23
- package/lib/responses/PreconditionalResponse.js.map +1 -1
- package/lib/responses/SuccessResponse.js +3 -23
- package/lib/responses/SuccessResponse.js.map +1 -1
- package/lib/responses/TimeoutResponse.js +3 -23
- package/lib/responses/TimeoutResponse.js.map +1 -1
- package/lib/services/CardinalAuthentication.js +19 -39
- package/lib/services/CardinalAuthentication.js.map +1 -1
- package/lib/services/Tokenization.js +58 -157
- package/lib/services/Tokenization.js.map +1 -1
- package/lib/services/Transaction.js +100 -201
- package/lib/services/Transaction.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- 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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
14
|
+
this.number = null;
|
|
31
15
|
/**
|
|
32
16
|
* Card security code
|
|
33
17
|
*/
|
|
34
|
-
|
|
18
|
+
this.cvv2 = null;
|
|
35
19
|
/**
|
|
36
20
|
* Card expire month date (MM)
|
|
37
21
|
*/
|
|
38
|
-
|
|
22
|
+
this.expire_month = null;
|
|
39
23
|
/**
|
|
40
24
|
* Card expire year date (YYYY)
|
|
41
25
|
*/
|
|
42
|
-
|
|
26
|
+
this.expire_year = null;
|
|
43
27
|
/**
|
|
44
28
|
* Cardholder name
|
|
45
29
|
*/
|
|
46
|
-
|
|
30
|
+
this.cardholder = null;
|
|
47
31
|
/**
|
|
48
32
|
* Customer billing address
|
|
49
33
|
*/
|
|
50
|
-
|
|
34
|
+
this.address = null;
|
|
51
35
|
/**
|
|
52
36
|
* Customer billing country alpha-2 code (ISO 3166-1)
|
|
53
37
|
*/
|
|
54
|
-
|
|
38
|
+
this.country = null;
|
|
55
39
|
/**
|
|
56
40
|
* Customer billing state alpha code (ISO 3166-2)
|
|
57
41
|
*/
|
|
58
|
-
|
|
42
|
+
this.state = null;
|
|
59
43
|
/**
|
|
60
44
|
* Customer billing city
|
|
61
45
|
*/
|
|
62
|
-
|
|
46
|
+
this.city = null;
|
|
63
47
|
/**
|
|
64
48
|
* Customer billing postal code
|
|
65
49
|
*/
|
|
66
|
-
|
|
50
|
+
this.zip = null;
|
|
67
51
|
/**
|
|
68
52
|
* Customer billing phone
|
|
69
53
|
*/
|
|
70
|
-
|
|
54
|
+
this.phone = null;
|
|
71
55
|
/**
|
|
72
56
|
* Customer email
|
|
73
57
|
*/
|
|
74
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"CardTokenization.js","sourceRoot":"","sources":["../../src/requests/CardTokenization.ts"],"names":[],"mappings":";;;;;AAAA,gFAA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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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
13
|
+
this.identifier = null;
|
|
30
14
|
/**
|
|
31
15
|
* Cardinal Validation JWT payload
|
|
32
16
|
*/
|
|
33
|
-
|
|
17
|
+
this.payload = null;
|
|
34
18
|
/**
|
|
35
19
|
* Tokenized card identifier (T-* format)
|
|
36
20
|
*/
|
|
37
|
-
|
|
21
|
+
this.card_token = null;
|
|
38
22
|
/**
|
|
39
23
|
* Cardinal authentication flag for tokenization
|
|
40
24
|
*/
|
|
41
|
-
|
|
42
|
-
return _this;
|
|
25
|
+
this.authenticate_token = false;
|
|
43
26
|
}
|
|
44
|
-
|
|
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":"
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
15
|
+
this.card_token = null;
|
|
32
16
|
/**
|
|
33
17
|
* Card number or PAN
|
|
34
18
|
*/
|
|
35
|
-
|
|
19
|
+
this.card_number = null;
|
|
36
20
|
/**
|
|
37
21
|
* Card expire year/month date (YYMM)
|
|
38
22
|
*/
|
|
39
|
-
|
|
23
|
+
this.card_expire = null;
|
|
40
24
|
/**
|
|
41
25
|
* Customer billing address
|
|
42
26
|
*/
|
|
43
|
-
|
|
27
|
+
this.billing_address = null;
|
|
44
28
|
/**
|
|
45
29
|
* Customer billing country alpha-2 code (ISO 3166-1)
|
|
46
30
|
*/
|
|
47
|
-
|
|
31
|
+
this.billing_country = null;
|
|
48
32
|
/**
|
|
49
33
|
* Customer billing state alpha code (ISO 3166-2)
|
|
50
34
|
*/
|
|
51
|
-
|
|
35
|
+
this.billing_state = null;
|
|
52
36
|
/**
|
|
53
37
|
* Customer billing city
|
|
54
38
|
*/
|
|
55
|
-
|
|
39
|
+
this.billing_city = null;
|
|
56
40
|
/**
|
|
57
41
|
* Customer billing postal code
|
|
58
42
|
*/
|
|
59
|
-
|
|
43
|
+
this.billing_zip = null;
|
|
60
44
|
/**
|
|
61
45
|
* Customer billing phone
|
|
62
46
|
*/
|
|
63
|
-
|
|
47
|
+
this.billing_phone = null;
|
|
64
48
|
/**
|
|
65
49
|
* Order customer name
|
|
66
50
|
*/
|
|
67
|
-
|
|
51
|
+
this.customer_name = null;
|
|
68
52
|
/**
|
|
69
53
|
* Order customer email
|
|
70
54
|
*/
|
|
71
|
-
|
|
55
|
+
this.customer_email = null;
|
|
72
56
|
/**
|
|
73
57
|
* Order ID
|
|
74
58
|
*/
|
|
75
|
-
|
|
59
|
+
this.order_id = null;
|
|
76
60
|
/**
|
|
77
61
|
* Order currency code alpha-3
|
|
78
62
|
*/
|
|
79
|
-
|
|
63
|
+
this.order_currency = null;
|
|
80
64
|
/**
|
|
81
65
|
* Order total amount
|
|
82
66
|
*/
|
|
83
|
-
|
|
67
|
+
this.order_amount = null;
|
|
84
68
|
/**
|
|
85
69
|
* Indicates the maximum number of authorizations for installment payments.
|
|
86
70
|
*/
|
|
87
|
-
|
|
71
|
+
this.installment = null;
|
|
88
72
|
/**
|
|
89
73
|
* Secure payload for transactions
|
|
90
74
|
*/
|
|
91
|
-
|
|
75
|
+
this.secure_payload = null;
|
|
92
76
|
/**
|
|
93
77
|
* Cardinal session reference
|
|
94
78
|
*/
|
|
95
|
-
|
|
79
|
+
this.reference = null;
|
|
96
80
|
/**
|
|
97
81
|
* Ability of the cardholder browser to execute Java.
|
|
98
82
|
*/
|
|
99
|
-
|
|
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
|
-
|
|
87
|
+
this.browser_header = null;
|
|
104
88
|
/**
|
|
105
89
|
* Browser language as defined in IETF BCP47 .
|
|
106
90
|
*/
|
|
107
|
-
|
|
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
|
-
|
|
95
|
+
this.browser_color_depth = null;
|
|
112
96
|
/**
|
|
113
97
|
* Total height of the Cardholder's scree in pixels
|
|
114
98
|
*/
|
|
115
|
-
|
|
99
|
+
this.browser_screen_height = null;
|
|
116
100
|
/**
|
|
117
101
|
* Total width of the Cardholder's scree in pixels
|
|
118
102
|
*/
|
|
119
|
-
|
|
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
|
-
|
|
107
|
+
this.browser_time_zone = null;
|
|
124
108
|
/**
|
|
125
109
|
* The exact content of the HTTP user agent header.
|
|
126
110
|
*/
|
|
127
|
-
|
|
111
|
+
this.user_agent = null;
|
|
128
112
|
/**
|
|
129
113
|
* The IP address of the Consumer.
|
|
130
114
|
*/
|
|
131
|
-
|
|
115
|
+
this.ip_address = null;
|
|
132
116
|
/**
|
|
133
117
|
* Cardinal device channel (SDK or Browser)
|
|
134
118
|
*/
|
|
135
|
-
|
|
119
|
+
this.device_channel = 'Browser';
|
|
136
120
|
/**
|
|
137
121
|
* Ability of the cardholder browser to execute JavaScript.
|
|
138
122
|
*/
|
|
139
|
-
|
|
123
|
+
this.browser_javascript_enabled = 'true';
|
|
140
124
|
/**
|
|
141
125
|
* Cardinal authentication flag for tokenization
|
|
142
126
|
*/
|
|
143
|
-
|
|
144
|
-
return _this;
|
|
127
|
+
this.authenticate_token = false;
|
|
145
128
|
}
|
|
146
129
|
/**
|
|
147
130
|
* Cast PaymentTransaction to LookupTransaction
|
|
148
131
|
*/
|
|
149
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"LookupTransaction.js","sourceRoot":"","sources":["../../src/requests/LookupTransaction.ts"],"names":[],"mappings":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