@pixelpay/sdk-core 2.3.0-beta.1 → 2.3.1
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/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/tsconfig.json +2 -3
|
@@ -1,178 +1,160 @@
|
|
|
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 Helpers_1 = __importDefault(require("../base/Helpers"));
|
|
7
|
+
const RequestBehaviour_1 = __importDefault(require("../base/RequestBehaviour"));
|
|
8
|
+
class PaymentTransaction extends RequestBehaviour_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
27
11
|
/**
|
|
28
12
|
* Payment UUID
|
|
29
13
|
*/
|
|
30
|
-
|
|
14
|
+
this.payment_uuid = null;
|
|
31
15
|
/**
|
|
32
16
|
* Tokenized card identifier (T-* format)
|
|
33
17
|
*/
|
|
34
|
-
|
|
18
|
+
this.card_token = null;
|
|
35
19
|
/**
|
|
36
20
|
* Card number or PAN
|
|
37
21
|
*/
|
|
38
|
-
|
|
22
|
+
this.card_number = null;
|
|
39
23
|
/**
|
|
40
24
|
* Card security code
|
|
41
25
|
*/
|
|
42
|
-
|
|
26
|
+
this.card_cvv = null;
|
|
43
27
|
/**
|
|
44
28
|
* Card expire year/month date (YYMM)
|
|
45
29
|
*/
|
|
46
|
-
|
|
30
|
+
this.card_expire = null;
|
|
47
31
|
/**
|
|
48
32
|
* Cardholder name
|
|
49
33
|
*/
|
|
50
|
-
|
|
34
|
+
this.card_holder = null;
|
|
51
35
|
/**
|
|
52
36
|
* Customer billing address
|
|
53
37
|
*/
|
|
54
|
-
|
|
38
|
+
this.billing_address = null;
|
|
55
39
|
/**
|
|
56
40
|
* Customer billing country alpha-2 code (ISO 3166-1)
|
|
57
41
|
*/
|
|
58
|
-
|
|
42
|
+
this.billing_country = null;
|
|
59
43
|
/**
|
|
60
44
|
* Customer billing state alpha code (ISO 3166-2)
|
|
61
45
|
*/
|
|
62
|
-
|
|
46
|
+
this.billing_state = null;
|
|
63
47
|
/**
|
|
64
48
|
* Customer billing city
|
|
65
49
|
*/
|
|
66
|
-
|
|
50
|
+
this.billing_city = null;
|
|
67
51
|
/**
|
|
68
52
|
* Customer billing postal code
|
|
69
53
|
*/
|
|
70
|
-
|
|
54
|
+
this.billing_zip = null;
|
|
71
55
|
/**
|
|
72
56
|
* Customer billing phone
|
|
73
57
|
*/
|
|
74
|
-
|
|
58
|
+
this.billing_phone = null;
|
|
75
59
|
/**
|
|
76
60
|
* Order customer name
|
|
77
61
|
*/
|
|
78
|
-
|
|
62
|
+
this.customer_name = null;
|
|
79
63
|
/**
|
|
80
64
|
* Order customer email
|
|
81
65
|
*/
|
|
82
|
-
|
|
66
|
+
this.customer_email = null;
|
|
83
67
|
/**
|
|
84
68
|
* Order customer device fingerprint
|
|
85
69
|
*/
|
|
86
|
-
|
|
70
|
+
this.customer_fingerprint = null;
|
|
87
71
|
/**
|
|
88
72
|
* Order ID
|
|
89
73
|
*/
|
|
90
|
-
|
|
74
|
+
this.order_id = null;
|
|
91
75
|
/**
|
|
92
76
|
* Order currency code alpha-3
|
|
93
77
|
*/
|
|
94
|
-
|
|
78
|
+
this.order_currency = null;
|
|
95
79
|
/**
|
|
96
80
|
* Order total amount
|
|
97
81
|
*/
|
|
98
|
-
|
|
82
|
+
this.order_amount = null;
|
|
99
83
|
/**
|
|
100
84
|
* Order total tax amount
|
|
101
85
|
*/
|
|
102
|
-
|
|
86
|
+
this.order_tax_amount = null;
|
|
103
87
|
/**
|
|
104
88
|
* Order total shipping amount
|
|
105
89
|
*/
|
|
106
|
-
|
|
90
|
+
this.order_shipping_amount = null;
|
|
107
91
|
/**
|
|
108
92
|
* Order summary of items or products
|
|
109
93
|
*/
|
|
110
|
-
|
|
94
|
+
this.order_content = [];
|
|
111
95
|
/**
|
|
112
96
|
* Order extra properties
|
|
113
97
|
*/
|
|
114
|
-
|
|
98
|
+
this.order_extras = {};
|
|
115
99
|
/**
|
|
116
100
|
* Order note or aditional instructions
|
|
117
101
|
*/
|
|
118
|
-
|
|
102
|
+
this.order_note = null;
|
|
119
103
|
/**
|
|
120
104
|
* Order calback webhook URL
|
|
121
105
|
*/
|
|
122
|
-
|
|
106
|
+
this.order_callback = null;
|
|
123
107
|
/**
|
|
124
108
|
* Activate authentication request (3DS/EMV)
|
|
125
109
|
*/
|
|
126
|
-
|
|
110
|
+
this.authentication_request = false;
|
|
127
111
|
/**
|
|
128
112
|
* Authentication transaction identifier
|
|
129
113
|
*/
|
|
130
|
-
|
|
114
|
+
this.authentication_identifier = null;
|
|
131
115
|
/**
|
|
132
116
|
* Secure payload for transactions
|
|
133
117
|
*/
|
|
134
|
-
|
|
135
|
-
return _this;
|
|
118
|
+
this.secure_payload = null;
|
|
136
119
|
}
|
|
137
120
|
/**
|
|
138
121
|
* Associate and mapping Card model properties to transaction
|
|
139
122
|
*
|
|
140
123
|
* @param card
|
|
141
124
|
*/
|
|
142
|
-
|
|
125
|
+
setCard(card) {
|
|
143
126
|
this.card_number = Helpers_1.default.cleanString(card.number);
|
|
144
127
|
this.card_cvv = card.cvv2;
|
|
145
128
|
this.card_expire = card.getExpireFormat();
|
|
146
129
|
this.card_holder = Helpers_1.default.trimValue(card.cardholder);
|
|
147
|
-
}
|
|
130
|
+
}
|
|
148
131
|
/**
|
|
149
132
|
* Associate and mapping CardToken model properties to transaction
|
|
150
133
|
*
|
|
151
134
|
* @param token
|
|
152
135
|
*/
|
|
153
|
-
|
|
154
|
-
if (token === void 0) { token = null; }
|
|
136
|
+
setCardToken(token = null) {
|
|
155
137
|
this.card_token = token;
|
|
156
|
-
}
|
|
138
|
+
}
|
|
157
139
|
/**
|
|
158
140
|
* Associate and mapping Billing model properties to transaction
|
|
159
141
|
*
|
|
160
142
|
* @param billing
|
|
161
143
|
*/
|
|
162
|
-
|
|
144
|
+
setBilling(billing) {
|
|
163
145
|
this.billing_address = Helpers_1.default.trimValue(billing.address);
|
|
164
146
|
this.billing_country = billing.country;
|
|
165
147
|
this.billing_state = billing.state;
|
|
166
148
|
this.billing_city = Helpers_1.default.trimValue(billing.city);
|
|
167
149
|
this.billing_zip = billing.zip;
|
|
168
150
|
this.billing_phone = billing.phone;
|
|
169
|
-
}
|
|
151
|
+
}
|
|
170
152
|
/**
|
|
171
153
|
* Associate and mapping Order model properties to transaction
|
|
172
154
|
*
|
|
173
155
|
* @param order
|
|
174
156
|
*/
|
|
175
|
-
|
|
157
|
+
setOrder(order) {
|
|
176
158
|
this.order_id = order.id;
|
|
177
159
|
this.order_currency = order.currency;
|
|
178
160
|
this.order_amount = Helpers_1.default.parseAmount(order.amount);
|
|
@@ -184,14 +166,13 @@ var PaymentTransaction = /** @class */ (function (_super) {
|
|
|
184
166
|
this.order_callback = order.callback_url;
|
|
185
167
|
this.customer_name = Helpers_1.default.trimValue(order.customer_name);
|
|
186
168
|
this.customer_email = order.customer_email;
|
|
187
|
-
}
|
|
169
|
+
}
|
|
188
170
|
/**
|
|
189
171
|
* Enable 3DS/EMV authentication request
|
|
190
172
|
*/
|
|
191
|
-
|
|
173
|
+
withAuthenticationRequest() {
|
|
192
174
|
this.authentication_request = true;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
}(RequestBehaviour_1.default));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
196
177
|
exports.default = PaymentTransaction;
|
|
197
178
|
//# sourceMappingURL=PaymentTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentTransaction.js","sourceRoot":"","sources":["../../src/requests/PaymentTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaymentTransaction.js","sourceRoot":"","sources":["../../src/requests/PaymentTransaction.ts"],"names":[],"mappings":";;;;;AAIA,8DAAsC;AACtC,gFAAwD;AAExD,MAAqB,kBAAmB,SAAQ,0BAAgB;IAAhE;;QACC;;WAEG;QACH,iBAAY,GAAW,IAAI,CAAC;QAE5B;;WAEG;QACH,eAAU,GAAW,IAAI,CAAC;QAE1B;;WAEG;QACH,gBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,aAAQ,GAAW,IAAI,CAAC;QAExB;;WAEG;QACH,gBAAW,GAAW,I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AAK,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAC;QAEzC,IAAI,CAAC,aAAa,GAAG,iBAAO,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,yBAAyB;QACxB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;IACpC,CAAC;CACD;AArMD,qCAqMC"}
|
|
@@ -1,42 +1,25 @@
|
|
|
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 Helpers_1 = __importDefault(require("../base/Helpers"));
|
|
7
|
+
const PaymentTransaction_1 = __importDefault(require("./PaymentTransaction"));
|
|
8
|
+
class SaleTransaction extends PaymentTransaction_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
27
11
|
/**
|
|
28
12
|
* Transaction installment type
|
|
29
13
|
*/
|
|
30
|
-
|
|
14
|
+
this.installment_type = null;
|
|
31
15
|
/**
|
|
32
16
|
* Transaction installment value
|
|
33
17
|
*/
|
|
34
|
-
|
|
18
|
+
this.installment_months = null;
|
|
35
19
|
/**
|
|
36
20
|
* Transaction total points redeem amount
|
|
37
21
|
*/
|
|
38
|
-
|
|
39
|
-
return _this;
|
|
22
|
+
this.points_redeem_amount = null;
|
|
40
23
|
}
|
|
41
24
|
/**
|
|
42
25
|
* Set Installment service values to transaction
|
|
@@ -44,19 +27,18 @@ var SaleTransaction = /** @class */ (function (_super) {
|
|
|
44
27
|
* @param months
|
|
45
28
|
* @param type
|
|
46
29
|
*/
|
|
47
|
-
|
|
30
|
+
setInstallment(months, type) {
|
|
48
31
|
this.installment_months = String(months);
|
|
49
32
|
this.installment_type = type;
|
|
50
|
-
}
|
|
33
|
+
}
|
|
51
34
|
/**
|
|
52
35
|
* Set transaction points redeem amount
|
|
53
36
|
*
|
|
54
37
|
* @param amount
|
|
55
38
|
*/
|
|
56
|
-
|
|
39
|
+
withPointsRedeemAmount(amount) {
|
|
57
40
|
this.points_redeem_amount = Helpers_1.default.parseAmount(amount);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}(PaymentTransaction_1.default));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
61
43
|
exports.default = SaleTransaction;
|
|
62
44
|
//# sourceMappingURL=SaleTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaleTransaction.js","sourceRoot":"","sources":["../../src/requests/SaleTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SaleTransaction.js","sourceRoot":"","sources":["../../src/requests/SaleTransaction.ts"],"names":[],"mappings":";;;;;AAAA,8DAAsC;AACtC,8EAAsD;AAEtD,MAAqB,eAAgB,SAAQ,4BAAkB;IAA/D;;QACC;;WAEG;QACH,qBAAgB,GAAW,IAAI,CAAC;QAEhC;;WAEG;QACH,uBAAkB,GAAW,IAAI,CAAC;QAElC;;WAEG;QACH,yBAAoB,GAAW,IAAI,CAAC;IAqBrC,CAAC;IAnBA;;;;;OAKG;IACH,cAAc,CAAC,MAAc,EAAE,IAAY;QAC1C,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,sBAAsB,CAAC,MAAc;QACpC,IAAI,CAAC,oBAAoB,GAAG,iBAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;CACD;AAnCD,kCAmCC"}
|
|
@@ -1,35 +1,17 @@
|
|
|
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 StatusTransaction extends RequestBehaviour_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
26
10
|
/**
|
|
27
11
|
* Payment UUID
|
|
28
12
|
*/
|
|
29
|
-
|
|
30
|
-
return _this;
|
|
13
|
+
this.payment_uuid = null;
|
|
31
14
|
}
|
|
32
|
-
|
|
33
|
-
}(RequestBehaviour_1.default));
|
|
15
|
+
}
|
|
34
16
|
exports.default = StatusTransaction;
|
|
35
17
|
//# sourceMappingURL=StatusTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTransaction.js","sourceRoot":"","sources":["../../src/requests/StatusTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusTransaction.js","sourceRoot":"","sources":["../../src/requests/StatusTransaction.ts"],"names":[],"mappings":";;;;;AAAA,gFAAwD;AAExD,MAAqB,iBAAkB,SAAQ,0BAAgB;IAA/D;;QACC;;WAEG;QACH,iBAAY,GAAW,IAAI,CAAC;IAC7B,CAAC;CAAA;AALD,oCAKC"}
|
|
@@ -1,43 +1,25 @@
|
|
|
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 VoidTransaction extends RequestBehaviour_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
26
10
|
/**
|
|
27
11
|
* Payment UUID
|
|
28
12
|
*/
|
|
29
|
-
|
|
13
|
+
this.payment_uuid = null;
|
|
30
14
|
/**
|
|
31
15
|
* Reason for void the order
|
|
32
16
|
*/
|
|
33
|
-
|
|
17
|
+
this.void_reason = null;
|
|
34
18
|
/**
|
|
35
19
|
* Required signature for void authentication
|
|
36
20
|
*/
|
|
37
|
-
|
|
38
|
-
return _this;
|
|
21
|
+
this.void_signature = null;
|
|
39
22
|
}
|
|
40
|
-
|
|
41
|
-
}(RequestBehaviour_1.default));
|
|
23
|
+
}
|
|
42
24
|
exports.default = VoidTransaction;
|
|
43
25
|
//# sourceMappingURL=VoidTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoidTransaction.js","sourceRoot":"","sources":["../../src/requests/VoidTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VoidTransaction.js","sourceRoot":"","sources":["../../src/requests/VoidTransaction.ts"],"names":[],"mappings":";;;;;AAAA,gFAAwD;AAExD,MAAqB,eAAgB,SAAQ,0BAAgB;IAA7D;;QACC;;WAEG;QACH,iBAAY,GAAW,IAAI,CAAC;QAE5B;;WAEG;QACH,gBAAW,GAAW,IAAI,CAAC;QAE3B;;WAEG;QACH,mBAAc,GAAW,IAAI,CAAC;IAC/B,CAAC;CAAA;AAfD,kCAeC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
Environment.LIVE = "live";
|
|
7
|
-
Environment.TEST = "test";
|
|
8
|
-
Environment.SANDBOX = "sandbox";
|
|
9
|
-
Environment.STAGING = "staging";
|
|
10
|
-
return Environment;
|
|
11
|
-
}());
|
|
3
|
+
class Environment {
|
|
4
|
+
}
|
|
12
5
|
exports.default = Environment;
|
|
6
|
+
Environment.LIVE = "live";
|
|
7
|
+
Environment.TEST = "test";
|
|
8
|
+
Environment.SANDBOX = "sandbox";
|
|
9
|
+
Environment.STAGING = "staging";
|
|
13
10
|
//# sourceMappingURL=Environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/resources/Environment.ts"],"names":[],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/resources/Environment.ts"],"names":[],"mappings":";;AAAA,MAAqB,WAAW;;AAAhC,8BAKC;AAJgB,gBAAI,GAAG,MAAM,CAAC;AACd,gBAAI,GAAG,MAAM,CAAC;AACd,mBAAO,GAAG,SAAS,CAAC;AACpB,mBAAO,GAAG,SAAS,CAAC"}
|
|
@@ -23,16 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const countriesRepository = __importStar(require("../assets/countries.json"));
|
|
27
|
+
const statesRepository = __importStar(require("../assets/states.json"));
|
|
28
|
+
const formatsRepository = __importStar(require("../assets/formats.json"));
|
|
29
29
|
exports.default = {
|
|
30
30
|
/**
|
|
31
31
|
* Return a list of countries
|
|
32
32
|
*
|
|
33
33
|
* @return
|
|
34
34
|
*/
|
|
35
|
-
countriesList:
|
|
35
|
+
countriesList: () => {
|
|
36
36
|
return countriesRepository || {};
|
|
37
37
|
},
|
|
38
38
|
/**
|
|
@@ -41,7 +41,7 @@ exports.default = {
|
|
|
41
41
|
* @param country_code
|
|
42
42
|
* @return
|
|
43
43
|
*/
|
|
44
|
-
statesList:
|
|
44
|
+
statesList: (country_code) => {
|
|
45
45
|
if (!Object.prototype.hasOwnProperty.call(statesRepository || {}, country_code)) {
|
|
46
46
|
return {};
|
|
47
47
|
}
|
|
@@ -53,7 +53,7 @@ exports.default = {
|
|
|
53
53
|
* @param country_code
|
|
54
54
|
* @return
|
|
55
55
|
*/
|
|
56
|
-
formatsList:
|
|
56
|
+
formatsList: (country_code) => {
|
|
57
57
|
if (!Object.prototype.hasOwnProperty.call(formatsRepository || {}, country_code)) {
|
|
58
58
|
return {};
|
|
59
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Locations.js","sourceRoot":"","sources":["../../src/resources/Locations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Locations.js","sourceRoot":"","sources":["../../src/resources/Locations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAAgE;AAChE,wEAA0D;AAC1D,0EAA4D;AAE5D,kBAAe;IACd;;;;OAIG;IACH,aAAa,EAAE,GAAG,EAAE;QACnB,OAAO,mBAAmB,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,UAAU,EAAE,CAAC,YAAoB,EAAE,EAAE;QACpC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,IAAI,EAAE,EAAE,YAAY,CAAC,EAAE;YAChF,OAAO,EAAE,CAAC;SACV;QAED,OAAO,gBAAgB,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACH,WAAW,EAAE,CAAC,YAAoB,EAAE,EAAE;QACrC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,IAAI,EAAE,EAAE,YAAY,CAAC,EAAE;YACjF,OAAO,EAAE,CAAC;SACV;QAED,OAAO,iBAAiB,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;CACD,CAAA"}
|
|
@@ -1,30 +1,10 @@
|
|
|
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
|
-
function ErrorResponse() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
return ErrorResponse;
|
|
28
|
-
}(Response_1.default));
|
|
6
|
+
const Response_1 = __importDefault(require("../base/Response"));
|
|
7
|
+
class ErrorResponse extends Response_1.default {
|
|
8
|
+
}
|
|
29
9
|
exports.default = ErrorResponse;
|
|
30
10
|
//# sourceMappingURL=ErrorResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC,MAAqB,aAAc,SAAQ,kBAAQ;CAElD;AAFD,gCAEC"}
|
|
@@ -1,30 +1,10 @@
|
|
|
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
|
-
function FailureResponse() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
return FailureResponse;
|
|
28
|
-
}(Response_1.default));
|
|
6
|
+
const Response_1 = __importDefault(require("../base/Response"));
|
|
7
|
+
class FailureResponse extends Response_1.default {
|
|
8
|
+
}
|
|
29
9
|
exports.default = FailureResponse;
|
|
30
10
|
//# sourceMappingURL=FailureResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FailureResponse.js","sourceRoot":"","sources":["../../src/responses/FailureResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FailureResponse.js","sourceRoot":"","sources":["../../src/responses/FailureResponse.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC,MAAqB,eAAgB,SAAQ,kBAAQ;CAEpD;AAFD,kCAEC"}
|
|
@@ -1,30 +1,10 @@
|
|
|
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
|
-
function InputErrorResponse() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
return InputErrorResponse;
|
|
28
|
-
}(Response_1.default));
|
|
6
|
+
const Response_1 = __importDefault(require("../base/Response"));
|
|
7
|
+
class InputErrorResponse extends Response_1.default {
|
|
8
|
+
}
|
|
29
9
|
exports.default = InputErrorResponse;
|
|
30
10
|
//# sourceMappingURL=InputErrorResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputErrorResponse.js","sourceRoot":"","sources":["../../src/responses/InputErrorResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputErrorResponse.js","sourceRoot":"","sources":["../../src/responses/InputErrorResponse.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AAExC,MAAqB,kBAAmB,SAAQ,kBAAQ;CAEvD;AAFD,qCAEC"}
|