@houlak/plexo-sdk 0.1.7-fx → 0.1.8-fx
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/handler/PlexoHandler.d.ts +2 -2
- package/lib/handler/PlexoHandler.js +4 -4
- package/lib/sdk/IPaymentGatewayClient.d.ts +2 -2
- package/lib/sdk/PaymentGatewayClient.d.ts +5 -5
- package/lib/sdk/PaymentGatewayClient.js +259 -178
- package/lib/sdk/models/CommerceRequest.d.ts +2 -3
- package/lib/sdk/models/CommerceRequest.js +4 -23
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { Authorization, AuthorizationInfo, BaseServerResponse, CancelRequest, Cl
|
|
|
2
2
|
import { BaseResponse } from './types/BaseResponse';
|
|
3
3
|
import { FixedCustomData } from '../sdk/models/FixedCustomData';
|
|
4
4
|
export declare const PlexoHandler: {
|
|
5
|
-
AddCommerce: (commerceRequest: CommerceRequest) => Promise<BaseResponse<Commerce>>;
|
|
5
|
+
AddCommerce: (commerceRequest: CommerceRequest, fixedCustomData: FixedCustomData) => Promise<BaseResponse<Commerce>>;
|
|
6
6
|
AddIssuerCommerce: (issuerData: IssuerData) => Promise<BaseResponse<IssuerData>>;
|
|
7
7
|
DeleteCommerce: (commerceIdRequest: CommerceIdRequest) => Promise<BaseResponse<BaseServerResponse>>;
|
|
8
8
|
DeleteInstrument: (instrument: DeleteInstrumentRequest) => Promise<BaseResponse<BaseServerResponse>>;
|
|
@@ -19,7 +19,7 @@ export declare const PlexoHandler: {
|
|
|
19
19
|
CodeAction: (request: CodeRequest) => Promise<BaseResponse<Transaction>>;
|
|
20
20
|
StartReserve: (payment: ReserveRequest) => Promise<BaseResponse<Transaction>>;
|
|
21
21
|
Status: (payment: Reference) => Promise<BaseResponse<Transaction>>;
|
|
22
|
-
ExpressCheckout: (expressCheckout: ExpressCheckoutRequest) => Promise<BaseResponse<Session>>;
|
|
22
|
+
ExpressCheckout: (expressCheckout: ExpressCheckoutRequest, fixedCustomData: FixedCustomData) => Promise<BaseResponse<Session>>;
|
|
23
23
|
ObtainCsvTransactions: (query: TransactionQuery) => Promise<BaseResponse<TransactionsCSV>>;
|
|
24
24
|
ObtainTransactions: (query: TransactionQuery) => Promise<BaseResponse<TransactionCursor>>;
|
|
25
25
|
Purchase: (purchase: PaymentRequest) => Promise<BaseResponse<Transaction>>;
|
|
@@ -52,11 +52,11 @@ var index_1 = require("../sdk/index");
|
|
|
52
52
|
var evaluator_service_1 = require("./services/evaluator.service");
|
|
53
53
|
var utils_1 = require("../utils");
|
|
54
54
|
var paymentGatewayClient = new index_1.PaymentGatewayClient();
|
|
55
|
-
var AddCommerce = function (commerceRequest) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var AddCommerce = function (commerceRequest, fixedCustomData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var commerceResponse;
|
|
57
57
|
return __generator(this, function (_a) {
|
|
58
58
|
switch (_a.label) {
|
|
59
|
-
case 0: return [4 /*yield*/, paymentGatewayClient.AddCommerceAsync(commerceRequest)];
|
|
59
|
+
case 0: return [4 /*yield*/, paymentGatewayClient.AddCommerceAsync(commerceRequest, fixedCustomData)];
|
|
60
60
|
case 1:
|
|
61
61
|
commerceResponse = _a.sent();
|
|
62
62
|
return [2 /*return*/, evaluator_service_1.Evaluator.genericEvaluator(commerceRequest, commerceResponse)];
|
|
@@ -256,11 +256,11 @@ var Status = function (payment) { return __awaiter(void 0, void 0, void 0, funct
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
}); };
|
|
259
|
-
var ExpressCheckout = function (expressCheckout) { return __awaiter(void 0, void 0, void 0, function () {
|
|
259
|
+
var ExpressCheckout = function (expressCheckout, fixedCustomData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
260
260
|
var expressCheckoutResponse;
|
|
261
261
|
return __generator(this, function (_a) {
|
|
262
262
|
switch (_a.label) {
|
|
263
|
-
case 0: return [4 /*yield*/, paymentGatewayClient.ExpressCheckoutAsync(expressCheckout)];
|
|
263
|
+
case 0: return [4 /*yield*/, paymentGatewayClient.ExpressCheckoutAsync(expressCheckout, fixedCustomData)];
|
|
264
264
|
case 1:
|
|
265
265
|
expressCheckoutResponse = _a.sent();
|
|
266
266
|
return [2 /*return*/, evaluator_service_1.Evaluator.genericEvaluator(expressCheckout, expressCheckoutResponse)];
|
|
@@ -2,7 +2,7 @@ import { IssuerProcessor } from '.';
|
|
|
2
2
|
import { FixedCustomData } from './models/FixedCustomData';
|
|
3
3
|
import { Authorization, AuthorizationInfo, CancelRequest, ClientSignedResponse, CodeRequest, Commerce, CommerceIdRequest, CommerceIssuerIdRequest, CommerceModifyRequest, CommerceRequest, CreateBankInstrumentRequest, DeleteInstrumentRequest, ExpressCheckoutRequest, InstrumentCallback, IssuerData, IssuerInfo, PaymentRequest, PaymentInstrument, Reference, Reserve, ReserveRequest, BaseServerResponse, ServerResponse, ServerSignedCallback, Session, Transaction, TransactionCallback, TransactionCursor, TransactionQuery } from './models/IndexSDK';
|
|
4
4
|
export interface IPaymentGatewayClient {
|
|
5
|
-
AddCommerceAsync(commerce: CommerceRequest): Promise<ServerResponse<Commerce>>;
|
|
5
|
+
AddCommerceAsync(commerce: CommerceRequest, fixedCustomData: FixedCustomData): Promise<ServerResponse<Commerce>>;
|
|
6
6
|
AddIssuerCommerceAsync(issuerData: IssuerData): Promise<ServerResponse<IssuerData>>;
|
|
7
7
|
DeleteCommerceAsync(commerceIdRequest: CommerceIdRequest): Promise<BaseServerResponse>;
|
|
8
8
|
DeleteInstrumentAsync(info: DeleteInstrumentRequest): Promise<BaseServerResponse>;
|
|
@@ -19,7 +19,7 @@ export interface IPaymentGatewayClient {
|
|
|
19
19
|
CodeActionAsync(request: CodeRequest): Promise<ServerResponse<Transaction>>;
|
|
20
20
|
StartReserveAsync(payment: ReserveRequest): Promise<ServerResponse<Transaction>>;
|
|
21
21
|
StatusAsync(payment: Reference): Promise<ServerResponse<Transaction>>;
|
|
22
|
-
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest): Promise<ServerResponse<Session>>;
|
|
22
|
+
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest, fixedCustomData: FixedCustomData): Promise<ServerResponse<Session>>;
|
|
23
23
|
ObtainCsvTransactionsAsync(query: TransactionQuery): Promise<ServerResponse<string>>;
|
|
24
24
|
ObtainTransactionsAsync(query: TransactionQuery): Promise<ServerResponse<TransactionCursor>>;
|
|
25
25
|
PurchaseAsync(payment: PaymentRequest): Promise<ServerResponse<Transaction>>;
|
|
@@ -3,11 +3,10 @@ import { IssuerProcessor } from './index';
|
|
|
3
3
|
import { IPaymentGatewayClient } from './IPaymentGatewayClient';
|
|
4
4
|
import { FixedCustomData } from './models/FixedCustomData';
|
|
5
5
|
export declare class PaymentGatewayClient implements IPaymentGatewayClient {
|
|
6
|
-
AddCommerceAsync(commerce: CommerceRequest): Promise<ServerResponse<Commerce>>;
|
|
7
6
|
AddIssuerCommerceAsync(issuerData: IssuerData): Promise<ServerResponse<IssuerData>>;
|
|
8
|
-
DeleteCommerceAsync(commerceIdRequest: CommerceIdRequest): Promise<
|
|
9
|
-
DeleteInstrumentAsync(info: DeleteInstrumentRequest): Promise<
|
|
10
|
-
DeleteIssuerCommerceAsync(commerceIssuerIdRequest: CommerceIssuerIdRequest): Promise<
|
|
7
|
+
DeleteCommerceAsync(commerceIdRequest: CommerceIdRequest): Promise<BaseServerResponse>;
|
|
8
|
+
DeleteInstrumentAsync(info: DeleteInstrumentRequest): Promise<BaseServerResponse>;
|
|
9
|
+
DeleteIssuerCommerceAsync(commerceIssuerIdRequest: CommerceIssuerIdRequest): Promise<BaseServerResponse>;
|
|
11
10
|
GetCommerceIssuersAsync(commerceIdRequest: CommerceIdRequest): Promise<ServerResponse<IssuerData[]>>;
|
|
12
11
|
GetCommercesAsync(fixedCustomData: FixedCustomData): Promise<ServerResponse<Commerce[]>>;
|
|
13
12
|
GetSupportedIssuersAsync(fixedCustomData: FixedCustomData): Promise<ServerResponse<IssuerInfo[]>>;
|
|
@@ -20,12 +19,13 @@ export declare class PaymentGatewayClient implements IPaymentGatewayClient {
|
|
|
20
19
|
CodeActionAsync(request: CodeRequest): Promise<ServerResponse<Transaction>>;
|
|
21
20
|
StartReserveAsync(payment: ReserveRequest): Promise<ServerResponse<Transaction>>;
|
|
22
21
|
StatusAsync(payment: Reference): Promise<ServerResponse<Transaction>>;
|
|
23
|
-
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest): Promise<ServerResponse<Session>>;
|
|
24
22
|
ObtainCsvTransactionsAsync(query: TransactionQuery): Promise<ServerResponse<string>>;
|
|
25
23
|
ObtainTransactionsAsync(query: TransactionQuery): Promise<ServerResponse<TransactionCursor>>;
|
|
26
24
|
PurchaseAsync(payment: PaymentRequest): Promise<ServerResponse<Transaction>>;
|
|
27
25
|
CreateBankInstrumentAsync(request: CreateBankInstrumentRequest): Promise<ServerResponse<PaymentInstrument>>;
|
|
28
26
|
EndReserveAsync(reserve: Reserve): Promise<ServerResponse<Transaction>>;
|
|
27
|
+
AddCommerceAsync(commerce: CommerceRequest, fixedCustomData: FixedCustomData): Promise<ServerResponse<Commerce>>;
|
|
28
|
+
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest, fixedCustomData: FixedCustomData): Promise<ServerResponse<Session>>;
|
|
29
29
|
UnwrapInstrumentCallbackAsync(serverSignedInstrumentCallback: ServerSignedCallback<InstrumentCallback>, plexoUrl: string): Promise<ServerResponse<InstrumentCallback>>;
|
|
30
30
|
UnwrapTransactionCallbackAsync(serverSignedTransactionCallback: ServerSignedCallback<TransactionCallback>, plexoUrl: string): Promise<ServerResponse<TransactionCallback>>;
|
|
31
31
|
SignInstrumentCallback(serverResponse: ServerResponse<InstrumentCallback>, plexoCertificatePath: string, plexoCertificatePassword: string): Promise<ClientSignedResponse>;
|
|
@@ -55,14 +55,14 @@ var utils_1 = require("../utils");
|
|
|
55
55
|
var client = axios_1.default.create({
|
|
56
56
|
baseURL: "https://testing.plexo.com.uy:4043/SecurePaymentGateway.svc",
|
|
57
57
|
});
|
|
58
|
-
var requestToPlexo = function (endpoint, request,
|
|
58
|
+
var requestToPlexo = function (endpoint, request, fixedCustomData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
59
|
var object, stateObject, signedClientRequest, data, err_1;
|
|
60
60
|
return __generator(this, function (_a) {
|
|
61
61
|
switch (_a.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
_a.trys.push([0, 3, , 4]);
|
|
64
64
|
object = {
|
|
65
|
-
client: plexoClientName,
|
|
65
|
+
client: fixedCustomData.plexoClientName,
|
|
66
66
|
request: request,
|
|
67
67
|
};
|
|
68
68
|
stateObject = {
|
|
@@ -70,7 +70,7 @@ var requestToPlexo = function (endpoint, request, plexoClientName, plexoCertific
|
|
|
70
70
|
utcUnixTimeExpiration: Date.parse(new Date().toString()),
|
|
71
71
|
object: object,
|
|
72
72
|
};
|
|
73
|
-
return [4 /*yield*/, signatureHelper_1.SignatureHelper.signRequest(stateObject, plexoCertificatePassword, plexoCertificatePath)];
|
|
73
|
+
return [4 /*yield*/, signatureHelper_1.SignatureHelper.signRequest(stateObject, fixedCustomData.plexoCertificatePassword, fixedCustomData.plexoCertificatePath)];
|
|
74
74
|
case 1:
|
|
75
75
|
signedClientRequest = _a.sent();
|
|
76
76
|
logger_lib_1.default.debug("URL PX: ".concat(endpoint));
|
|
@@ -91,236 +91,317 @@ var requestToPlexo = function (endpoint, request, plexoClientName, plexoCertific
|
|
|
91
91
|
var PaymentGatewayClient = /** @class */ (function () {
|
|
92
92
|
function PaymentGatewayClient() {
|
|
93
93
|
}
|
|
94
|
-
PaymentGatewayClient.prototype.AddCommerceAsync = function (commerce) {
|
|
95
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
-
return __generator(this, function (_a) {
|
|
97
|
-
switch (_a.label) {
|
|
98
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Add', commerce, commerce.plexoClientName, commerce.plexoCertificatePassword, commerce.plexoCertificatePath)];
|
|
99
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
94
|
PaymentGatewayClient.prototype.AddIssuerCommerceAsync = function (issuerData) {
|
|
105
|
-
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
switch (_a.label) {
|
|
108
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Issuer/Add', issuerData, issuerData.plexoClientName, issuerData.plexoCertificatePassword, issuerData.plexoCertificatePath)];
|
|
109
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
});
|
|
95
|
+
throw new Error('Method not implemented.');
|
|
113
96
|
};
|
|
114
97
|
PaymentGatewayClient.prototype.DeleteCommerceAsync = function (commerceIdRequest) {
|
|
115
|
-
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
switch (_a.label) {
|
|
118
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Delete', commerceIdRequest, commerceIdRequest.plexoClientName, commerceIdRequest.plexoCertificatePassword, commerceIdRequest.plexoCertificatePath)];
|
|
119
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
98
|
+
throw new Error('Method not implemented.');
|
|
123
99
|
};
|
|
124
100
|
PaymentGatewayClient.prototype.DeleteInstrumentAsync = function (info) {
|
|
125
|
-
|
|
126
|
-
return __generator(this, function (_a) {
|
|
127
|
-
switch (_a.label) {
|
|
128
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Instruments/Delete', info, info.plexoClientName, info.plexoCertificatePassword, info.plexoCertificatePath)];
|
|
129
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
});
|
|
101
|
+
throw new Error('Method not implemented.');
|
|
133
102
|
};
|
|
134
103
|
PaymentGatewayClient.prototype.DeleteIssuerCommerceAsync = function (commerceIssuerIdRequest) {
|
|
135
|
-
|
|
136
|
-
return __generator(this, function (_a) {
|
|
137
|
-
switch (_a.label) {
|
|
138
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Issuer/Delete', commerceIssuerIdRequest, commerceIssuerIdRequest.plexoClientName, commerceIssuerIdRequest.plexoCertificatePassword, commerceIssuerIdRequest.plexoCertificatePath)];
|
|
139
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
});
|
|
104
|
+
throw new Error('Method not implemented.');
|
|
143
105
|
};
|
|
144
106
|
PaymentGatewayClient.prototype.GetCommerceIssuersAsync = function (commerceIdRequest) {
|
|
145
|
-
|
|
146
|
-
return __generator(this, function (_a) {
|
|
147
|
-
switch (_a.label) {
|
|
148
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Issuer', commerceIdRequest, commerceIdRequest.plexoClientName, commerceIdRequest.plexoCertificatePassword, commerceIdRequest.plexoCertificatePath)];
|
|
149
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
});
|
|
107
|
+
throw new Error('Method not implemented.');
|
|
153
108
|
};
|
|
154
109
|
PaymentGatewayClient.prototype.GetCommercesAsync = function (fixedCustomData) {
|
|
155
|
-
|
|
156
|
-
return __generator(this, function (_a) {
|
|
157
|
-
switch (_a.label) {
|
|
158
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce', '', fixedCustomData.plexoClientName, fixedCustomData.plexoCertificatePassword, fixedCustomData.plexoCertificatePath)];
|
|
159
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
});
|
|
110
|
+
throw new Error('Method not implemented.');
|
|
163
111
|
};
|
|
164
112
|
PaymentGatewayClient.prototype.GetSupportedIssuersAsync = function (fixedCustomData) {
|
|
165
|
-
|
|
166
|
-
return __generator(this, function (_a) {
|
|
167
|
-
switch (_a.label) {
|
|
168
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Issuer', '', fixedCustomData.plexoClientName, fixedCustomData.plexoCertificatePassword, fixedCustomData.plexoCertificatePath)];
|
|
169
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
});
|
|
113
|
+
throw new Error('Method not implemented.');
|
|
173
114
|
};
|
|
174
115
|
PaymentGatewayClient.prototype.GetSupportedPaymentProcessorsAsync = function (fixedCustomData) {
|
|
175
|
-
|
|
176
|
-
return __generator(this, function (_a) {
|
|
177
|
-
switch (_a.label) {
|
|
178
|
-
case 0: return [4 /*yield*/, requestToPlexo('/PaymentProcessors', '', fixedCustomData.plexoClientName, fixedCustomData.plexoCertificatePassword, fixedCustomData.plexoCertificatePath)];
|
|
179
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
});
|
|
116
|
+
throw new Error('Method not implemented.');
|
|
183
117
|
};
|
|
184
118
|
PaymentGatewayClient.prototype.ModifyCommerceAsync = function (commerceModifyRequest) {
|
|
185
|
-
|
|
186
|
-
return __generator(this, function (_a) {
|
|
187
|
-
switch (_a.label) {
|
|
188
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Modify', commerceModifyRequest, commerceModifyRequest.plexoClientName, commerceModifyRequest.plexoCertificatePassword, commerceModifyRequest.plexoCertificatePath)];
|
|
189
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
});
|
|
119
|
+
throw new Error('Method not implemented.');
|
|
193
120
|
};
|
|
194
121
|
PaymentGatewayClient.prototype.GetInstrumentsAsync = function (authorizationInfo) {
|
|
195
|
-
|
|
196
|
-
return __generator(this, function (_a) {
|
|
197
|
-
switch (_a.label) {
|
|
198
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Instruments', authorizationInfo, authorizationInfo.plexoClientName, authorizationInfo.plexoCertificatePassword, authorizationInfo.plexoCertificatePath)];
|
|
199
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
});
|
|
122
|
+
throw new Error('Method not implemented.');
|
|
203
123
|
};
|
|
204
124
|
PaymentGatewayClient.prototype.SetDefaultCommerceAsync = function (commerceIdRequest) {
|
|
205
|
-
|
|
206
|
-
return __generator(this, function (_a) {
|
|
207
|
-
switch (_a.label) {
|
|
208
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/SetDefault', commerceIdRequest, commerceIdRequest.plexoClientName, commerceIdRequest.plexoCertificatePassword, commerceIdRequest.plexoCertificatePath)];
|
|
209
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
125
|
+
throw new Error('Method not implemented.');
|
|
213
126
|
};
|
|
214
127
|
PaymentGatewayClient.prototype.AuthorizeAsync = function (authorization) {
|
|
215
|
-
|
|
216
|
-
return __generator(this, function (_a) {
|
|
217
|
-
switch (_a.label) {
|
|
218
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Auth', authorization, authorization.plexoClientName, authorization.plexoCertificatePassword, authorization.plexoCertificatePath)];
|
|
219
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
});
|
|
128
|
+
throw new Error('Method not implemented.');
|
|
223
129
|
};
|
|
224
130
|
PaymentGatewayClient.prototype.CancelAsync = function (cancel) {
|
|
225
|
-
|
|
226
|
-
return __generator(this, function (_a) {
|
|
227
|
-
switch (_a.label) {
|
|
228
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Operation/Cancel', cancel, cancel.plexoClientName, cancel.plexoCertificatePassword, cancel.plexoCertificatePath)];
|
|
229
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
131
|
+
throw new Error('Method not implemented.');
|
|
233
132
|
};
|
|
234
133
|
PaymentGatewayClient.prototype.CodeActionAsync = function (request) {
|
|
235
|
-
|
|
236
|
-
return __generator(this, function (_a) {
|
|
237
|
-
switch (_a.label) {
|
|
238
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Code', request, request.plexoClientName, request.plexoCertificatePassword, request.plexoCertificatePath)];
|
|
239
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
});
|
|
134
|
+
throw new Error('Method not implemented.');
|
|
243
135
|
};
|
|
244
136
|
PaymentGatewayClient.prototype.StartReserveAsync = function (payment) {
|
|
245
|
-
|
|
246
|
-
return __generator(this, function (_a) {
|
|
247
|
-
switch (_a.label) {
|
|
248
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Operation/StartReserve', payment, payment.plexoClientName, payment.plexoCertificatePassword, payment.plexoCertificatePath)];
|
|
249
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
});
|
|
137
|
+
throw new Error('Method not implemented.');
|
|
253
138
|
};
|
|
254
139
|
PaymentGatewayClient.prototype.StatusAsync = function (payment) {
|
|
255
|
-
|
|
256
|
-
return __generator(this, function (_a) {
|
|
257
|
-
switch (_a.label) {
|
|
258
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Operation/Status', payment, payment.plexoClientName, payment.plexoCertificatePassword, payment.plexoCertificatePath)];
|
|
259
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
PaymentGatewayClient.prototype.ExpressCheckoutAsync = function (expressCheckout) {
|
|
265
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
266
|
-
return __generator(this, function (_a) {
|
|
267
|
-
switch (_a.label) {
|
|
268
|
-
case 0: return [4 /*yield*/, requestToPlexo('/ExpressCheckout', expressCheckout, expressCheckout.authorizationData.plexoClientName, expressCheckout.authorizationData.plexoCertificatePassword, expressCheckout.authorizationData.plexoCertificatePath)];
|
|
269
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
140
|
+
throw new Error('Method not implemented.');
|
|
273
141
|
};
|
|
274
142
|
PaymentGatewayClient.prototype.ObtainCsvTransactionsAsync = function (query) {
|
|
275
|
-
|
|
276
|
-
return __generator(this, function (_a) {
|
|
277
|
-
switch (_a.label) {
|
|
278
|
-
case 0: return [4 /*yield*/, requestToPlexo('/ExpressCheckout', query, query.plexoClientName, query.plexoCertificatePassword, query.plexoCertificatePath)];
|
|
279
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
143
|
+
throw new Error('Method not implemented.');
|
|
283
144
|
};
|
|
284
145
|
PaymentGatewayClient.prototype.ObtainTransactionsAsync = function (query) {
|
|
285
|
-
|
|
286
|
-
return __generator(this, function (_a) {
|
|
287
|
-
switch (_a.label) {
|
|
288
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Transactions', query, query.plexoClientName, query.plexoCertificatePassword, query.plexoCertificatePath)];
|
|
289
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
});
|
|
146
|
+
throw new Error('Method not implemented.');
|
|
293
147
|
};
|
|
294
148
|
PaymentGatewayClient.prototype.PurchaseAsync = function (payment) {
|
|
295
|
-
|
|
296
|
-
return __generator(this, function (_a) {
|
|
297
|
-
switch (_a.label) {
|
|
298
|
-
case 0: return [4 /*yield*/, requestToPlexo('/Operation/Purchase', payment, payment.plexoClientName, payment.plexoCertificatePassword, payment.plexoCertificatePath)];
|
|
299
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
});
|
|
149
|
+
throw new Error('Method not implemented.');
|
|
303
150
|
};
|
|
304
151
|
PaymentGatewayClient.prototype.CreateBankInstrumentAsync = function (request) {
|
|
152
|
+
throw new Error('Method not implemented.');
|
|
153
|
+
};
|
|
154
|
+
PaymentGatewayClient.prototype.EndReserveAsync = function (reserve) {
|
|
155
|
+
throw new Error('Method not implemented.');
|
|
156
|
+
};
|
|
157
|
+
PaymentGatewayClient.prototype.AddCommerceAsync = function (commerce, fixedCustomData) {
|
|
305
158
|
return __awaiter(this, void 0, void 0, function () {
|
|
306
159
|
return __generator(this, function (_a) {
|
|
307
160
|
switch (_a.label) {
|
|
308
|
-
case 0: return [4 /*yield*/, requestToPlexo('/
|
|
161
|
+
case 0: return [4 /*yield*/, requestToPlexo('/Commerce/Add', commerce, fixedCustomData)];
|
|
309
162
|
case 1: return [2 /*return*/, _a.sent()];
|
|
310
163
|
}
|
|
311
164
|
});
|
|
312
165
|
});
|
|
313
166
|
};
|
|
314
|
-
|
|
167
|
+
/*async AddIssuerCommerceAsync(issuerData: IssuerData): Promise<ServerResponse<IssuerData>> {
|
|
168
|
+
return await requestToPlexo<IssuerData, ServerResponse<IssuerData>>(
|
|
169
|
+
'/Commerce/Issuer/Add',
|
|
170
|
+
issuerData,
|
|
171
|
+
issuerData.plexoClientName,
|
|
172
|
+
issuerData.plexoCertificatePassword,
|
|
173
|
+
issuerData.plexoCertificatePath,
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async DeleteCommerceAsync(
|
|
178
|
+
commerceIdRequest: CommerceIdRequest,
|
|
179
|
+
): Promise<ServerResponse<BaseServerResponse>> {
|
|
180
|
+
return await requestToPlexo<CommerceIdRequest, ServerResponse<BaseServerResponse>>(
|
|
181
|
+
'/Commerce/Delete',
|
|
182
|
+
commerceIdRequest,
|
|
183
|
+
commerceIdRequest.plexoClientName,
|
|
184
|
+
commerceIdRequest.plexoCertificatePassword,
|
|
185
|
+
commerceIdRequest.plexoCertificatePath,
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async DeleteInstrumentAsync(
|
|
190
|
+
info: DeleteInstrumentRequest,
|
|
191
|
+
): Promise<ServerResponse<BaseServerResponse>> {
|
|
192
|
+
return await requestToPlexo<DeleteInstrumentRequest, ServerResponse<BaseServerResponse>>(
|
|
193
|
+
'/Instruments/Delete',
|
|
194
|
+
info,
|
|
195
|
+
info.plexoClientName,
|
|
196
|
+
info.plexoCertificatePassword,
|
|
197
|
+
info.plexoCertificatePath,
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async DeleteIssuerCommerceAsync(
|
|
202
|
+
commerceIssuerIdRequest: CommerceIssuerIdRequest,
|
|
203
|
+
): Promise<ServerResponse<BaseServerResponse>> {
|
|
204
|
+
return await requestToPlexo<CommerceIssuerIdRequest, ServerResponse<BaseServerResponse>>(
|
|
205
|
+
'/Commerce/Issuer/Delete',
|
|
206
|
+
commerceIssuerIdRequest,
|
|
207
|
+
commerceIssuerIdRequest.plexoClientName,
|
|
208
|
+
commerceIssuerIdRequest.plexoCertificatePassword,
|
|
209
|
+
commerceIssuerIdRequest.plexoCertificatePath,
|
|
210
|
+
)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async GetCommerceIssuersAsync(
|
|
214
|
+
commerceIdRequest: CommerceIdRequest,
|
|
215
|
+
): Promise<ServerResponse<IssuerData[]>> {
|
|
216
|
+
return await requestToPlexo<CommerceIdRequest, ServerResponse<IssuerData[]>>(
|
|
217
|
+
'/Commerce/Issuer',
|
|
218
|
+
commerceIdRequest,
|
|
219
|
+
commerceIdRequest.plexoClientName,
|
|
220
|
+
commerceIdRequest.plexoCertificatePassword,
|
|
221
|
+
commerceIdRequest.plexoCertificatePath,
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
async GetCommercesAsync(fixedCustomData: FixedCustomData): Promise<ServerResponse<Commerce[]>> {
|
|
226
|
+
return await requestToPlexo<string, ServerResponse<Commerce[]>>(
|
|
227
|
+
'/Commerce',
|
|
228
|
+
'',
|
|
229
|
+
fixedCustomData.plexoClientName,
|
|
230
|
+
fixedCustomData.plexoCertificatePassword,
|
|
231
|
+
fixedCustomData.plexoCertificatePath,
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
async GetSupportedIssuersAsync(
|
|
236
|
+
fixedCustomData: FixedCustomData,
|
|
237
|
+
): Promise<ServerResponse<IssuerInfo[]>> {
|
|
238
|
+
return await requestToPlexo<string, ServerResponse<IssuerInfo[]>>(
|
|
239
|
+
'/Issuer',
|
|
240
|
+
'',
|
|
241
|
+
fixedCustomData.plexoClientName,
|
|
242
|
+
fixedCustomData.plexoCertificatePassword,
|
|
243
|
+
fixedCustomData.plexoCertificatePath,
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
async GetSupportedPaymentProcessorsAsync(
|
|
248
|
+
fixedCustomData: FixedCustomData,
|
|
249
|
+
): Promise<ServerResponse<IssuerProcessor[]>> {
|
|
250
|
+
return await requestToPlexo<string, ServerResponse<IssuerProcessor[]>>(
|
|
251
|
+
'/PaymentProcessors',
|
|
252
|
+
'',
|
|
253
|
+
fixedCustomData.plexoClientName,
|
|
254
|
+
fixedCustomData.plexoCertificatePassword,
|
|
255
|
+
fixedCustomData.plexoCertificatePath,
|
|
256
|
+
)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
async ModifyCommerceAsync(
|
|
260
|
+
commerceModifyRequest: CommerceModifyRequest,
|
|
261
|
+
): Promise<ServerResponse<Commerce>> {
|
|
262
|
+
return await requestToPlexo<CommerceModifyRequest, ServerResponse<Commerce>>(
|
|
263
|
+
'/Commerce/Modify',
|
|
264
|
+
commerceModifyRequest,
|
|
265
|
+
commerceModifyRequest.plexoClientName,
|
|
266
|
+
commerceModifyRequest.plexoCertificatePassword,
|
|
267
|
+
commerceModifyRequest.plexoCertificatePath,
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async GetInstrumentsAsync(
|
|
272
|
+
authorizationInfo: AuthorizationInfo,
|
|
273
|
+
): Promise<ServerResponse<PaymentInstrument[]>> {
|
|
274
|
+
return await requestToPlexo<AuthorizationInfo, ServerResponse<PaymentInstrument[]>>(
|
|
275
|
+
'/Instruments',
|
|
276
|
+
authorizationInfo,
|
|
277
|
+
authorizationInfo.plexoClientName,
|
|
278
|
+
authorizationInfo.plexoCertificatePassword,
|
|
279
|
+
authorizationInfo.plexoCertificatePath,
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
async SetDefaultCommerceAsync(commerceIdRequest: CommerceIdRequest): Promise<BaseServerResponse> {
|
|
284
|
+
return await requestToPlexo<CommerceIdRequest, BaseServerResponse>(
|
|
285
|
+
'/Commerce/SetDefault',
|
|
286
|
+
commerceIdRequest,
|
|
287
|
+
commerceIdRequest.plexoClientName,
|
|
288
|
+
commerceIdRequest.plexoCertificatePassword,
|
|
289
|
+
commerceIdRequest.plexoCertificatePath,
|
|
290
|
+
)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
async AuthorizeAsync(authorization: Authorization): Promise<ServerResponse<Session>> {
|
|
294
|
+
return await requestToPlexo<Authorization, ServerResponse<Session>>(
|
|
295
|
+
'/Auth',
|
|
296
|
+
authorization,
|
|
297
|
+
authorization.plexoClientName,
|
|
298
|
+
authorization.plexoCertificatePassword,
|
|
299
|
+
authorization.plexoCertificatePath,
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
async CancelAsync(cancel: CancelRequest): Promise<ServerResponse<Transaction>> {
|
|
304
|
+
return await requestToPlexo<CancelRequest, ServerResponse<Transaction>>(
|
|
305
|
+
'/Operation/Cancel',
|
|
306
|
+
cancel,
|
|
307
|
+
cancel.plexoClientName,
|
|
308
|
+
cancel.plexoCertificatePassword,
|
|
309
|
+
cancel.plexoCertificatePath,
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
async CodeActionAsync(request: CodeRequest): Promise<ServerResponse<Transaction>> {
|
|
314
|
+
return await requestToPlexo<CodeRequest, ServerResponse<Transaction>>(
|
|
315
|
+
'/Code',
|
|
316
|
+
request,
|
|
317
|
+
request.plexoClientName,
|
|
318
|
+
request.plexoCertificatePassword,
|
|
319
|
+
request.plexoCertificatePath,
|
|
320
|
+
)
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async StartReserveAsync(payment: ReserveRequest): Promise<ServerResponse<Transaction>> {
|
|
324
|
+
return await requestToPlexo<ReserveRequest, ServerResponse<Transaction>>(
|
|
325
|
+
'/Operation/StartReserve',
|
|
326
|
+
payment,
|
|
327
|
+
payment.plexoClientName,
|
|
328
|
+
payment.plexoCertificatePassword,
|
|
329
|
+
payment.plexoCertificatePath,
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
async StatusAsync(payment: Reference): Promise<ServerResponse<Transaction>> {
|
|
334
|
+
return await requestToPlexo<Reference, ServerResponse<Transaction>>(
|
|
335
|
+
'/Operation/Status',
|
|
336
|
+
payment,
|
|
337
|
+
payment.plexoClientName,
|
|
338
|
+
payment.plexoCertificatePassword,
|
|
339
|
+
payment.plexoCertificatePath,
|
|
340
|
+
)
|
|
341
|
+
}*/
|
|
342
|
+
PaymentGatewayClient.prototype.ExpressCheckoutAsync = function (expressCheckout, fixedCustomData) {
|
|
315
343
|
return __awaiter(this, void 0, void 0, function () {
|
|
316
344
|
return __generator(this, function (_a) {
|
|
317
345
|
switch (_a.label) {
|
|
318
|
-
case 0: return [4 /*yield*/, requestToPlexo('/
|
|
346
|
+
case 0: return [4 /*yield*/, requestToPlexo('/ExpressCheckout', expressCheckout, fixedCustomData)];
|
|
319
347
|
case 1: return [2 /*return*/, _a.sent()];
|
|
320
348
|
}
|
|
321
349
|
});
|
|
322
350
|
});
|
|
323
351
|
};
|
|
352
|
+
/*async ObtainCsvTransactionsAsync(query: TransactionQuery): Promise<ServerResponse<string>> {
|
|
353
|
+
return await requestToPlexo<TransactionQuery, ServerResponse<string>>(
|
|
354
|
+
'/ExpressCheckout',
|
|
355
|
+
query,
|
|
356
|
+
query.plexoClientName,
|
|
357
|
+
query.plexoCertificatePassword,
|
|
358
|
+
query.plexoCertificatePath,
|
|
359
|
+
)
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
async ObtainTransactionsAsync(
|
|
363
|
+
query: TransactionQuery,
|
|
364
|
+
): Promise<ServerResponse<TransactionCursor>> {
|
|
365
|
+
return await requestToPlexo<TransactionQuery, ServerResponse<TransactionCursor>>(
|
|
366
|
+
'/Transactions',
|
|
367
|
+
query,
|
|
368
|
+
query.plexoClientName,
|
|
369
|
+
query.plexoCertificatePassword,
|
|
370
|
+
query.plexoCertificatePath,
|
|
371
|
+
)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
async PurchaseAsync(payment: PaymentRequest): Promise<ServerResponse<Transaction>> {
|
|
375
|
+
return await requestToPlexo<PaymentRequest, ServerResponse<Transaction>>(
|
|
376
|
+
'/Operation/Purchase',
|
|
377
|
+
payment,
|
|
378
|
+
payment.plexoClientName,
|
|
379
|
+
payment.plexoCertificatePassword,
|
|
380
|
+
payment.plexoCertificatePath,
|
|
381
|
+
)
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
async CreateBankInstrumentAsync(
|
|
385
|
+
request: CreateBankInstrumentRequest,
|
|
386
|
+
): Promise<ServerResponse<PaymentInstrument>> {
|
|
387
|
+
return await requestToPlexo<CreateBankInstrumentRequest, ServerResponse<PaymentInstrument>>(
|
|
388
|
+
'/Instruments/Bank',
|
|
389
|
+
request,
|
|
390
|
+
request.plexoClientName,
|
|
391
|
+
request.plexoCertificatePassword,
|
|
392
|
+
request.plexoCertificatePath,
|
|
393
|
+
)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
async EndReserveAsync(reserve: Reserve): Promise<ServerResponse<Transaction>> {
|
|
397
|
+
return await requestToPlexo<Reserve, ServerResponse<Transaction>>(
|
|
398
|
+
'/Operation/EndReserve',
|
|
399
|
+
reserve,
|
|
400
|
+
reserve.plexoClientName,
|
|
401
|
+
reserve.plexoCertificatePassword,
|
|
402
|
+
reserve.plexoCertificatePath,
|
|
403
|
+
)
|
|
404
|
+
}*/
|
|
324
405
|
PaymentGatewayClient.prototype.UnwrapInstrumentCallbackAsync = function (serverSignedInstrumentCallback, plexoUrl) {
|
|
325
406
|
return __awaiter(this, void 0, void 0, function () {
|
|
326
407
|
var verify;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class CommerceRequest extends FixedCustomData {
|
|
1
|
+
export declare class CommerceRequest {
|
|
3
2
|
name: string;
|
|
4
|
-
constructor(name: string
|
|
3
|
+
constructor(name: string);
|
|
5
4
|
}
|
|
@@ -1,29 +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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.CommerceRequest = void 0;
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function CommerceRequest(name, plexoClientName, plexoCertificatePassword, plexoCertificatePath) {
|
|
23
|
-
var _this = _super.call(this, plexoClientName, plexoCertificatePassword, plexoCertificatePath) || this;
|
|
24
|
-
_this.name = name;
|
|
25
|
-
return _this;
|
|
4
|
+
var CommerceRequest = /** @class */ (function () {
|
|
5
|
+
function CommerceRequest(name) {
|
|
6
|
+
this.name = name;
|
|
26
7
|
}
|
|
27
8
|
return CommerceRequest;
|
|
28
|
-
}(
|
|
9
|
+
}());
|
|
29
10
|
exports.CommerceRequest = CommerceRequest;
|