@kushki/js 1.37.1 → 1.37.3-alpha-13909
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/KushkiInfo.js +1 -1
- package/lib/repository/ICardService.d.ts +0 -5
- package/lib/service/CardService.d.ts +0 -3
- package/lib/service/CardService.js +1 -25
- package/lib/types/card_async_token_request.d.ts +1 -1
- package/lib/types/device_token_request.d.ts +1 -1
- package/lib/types/kushki_subscription_tokens_request.d.ts +1 -1
- package/lib/types/kushki_tokens_request.d.ts +1 -1
- package/lib/types/mobile_processor_charge_request.d.ts +1 -1
- package/lib/types/mobile_processor_token_request.d.ts +1 -1
- package/lib/types/remote/commission_configuration_amount.d.ts +1 -1
- package/lib/types/remote/commission_configuration_request.d.ts +1 -1
- package/lib/types/subscriptionId_request.d.ts +1 -1
- package/lib/types/subscription_token_kpay_request.d.ts +1 -1
- package/lib/types/subscription_token_request.d.ts +1 -1
- package/lib/types/token_charge_request.d.ts +1 -1
- package/package.json +1 -1
package/lib/KushkiInfo.js
CHANGED
|
@@ -11,7 +11,7 @@ const UtilsService_1 = require("./../lib/service/UtilsService");
|
|
|
11
11
|
*/
|
|
12
12
|
class KInfo {
|
|
13
13
|
static buildKushkiInfo(kushkiInfo) {
|
|
14
|
-
const kushki_js_version = "1.37.
|
|
14
|
+
const kushki_js_version = "1.37.3-alpha-13909";
|
|
15
15
|
if (kushkiInfo) {
|
|
16
16
|
if (UtilsService_1.UtilsService.sIsEmpty(kushkiInfo.platformVersion))
|
|
17
17
|
kushkiInfo.platformVersion = kushki_js_version;
|
|
@@ -79,9 +79,4 @@ export interface ICardService {
|
|
|
79
79
|
* @param regional - Define if endpoint used regional URL
|
|
80
80
|
*/
|
|
81
81
|
requestSecureInit(body: SecureInitRequest, mid: string, isTest: boolean, regional: boolean): Observable<SecureInitResponse>;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @param alreadyObtainedToken
|
|
85
|
-
*/
|
|
86
|
-
setAlreadyObtainedToken(alreadyObtainedToken: boolean): any;
|
|
87
82
|
}
|
|
@@ -39,7 +39,6 @@ export declare class CardService implements ICardService {
|
|
|
39
39
|
private readonly _3Dsecure;
|
|
40
40
|
private readonly _cardNumber;
|
|
41
41
|
private _sandboxEnable;
|
|
42
|
-
private _alreadyObtainedToken;
|
|
43
42
|
constructor(gateway: IKushkiGateway, authService: IAuthService, antiFraud: IAntiFraud);
|
|
44
43
|
requestToken(request: TokenRequest | TokenKPayRequest, mid: string, isTest: boolean, regional: boolean, callback: (value: TokenResponse | ErrorResponse) => void): void;
|
|
45
44
|
requestDeviceToken(request: SubscriptionIdRequest, mid: string, isTest: boolean, regional: boolean, callback: (value: TokenResponse | ErrorResponse) => void): void;
|
|
@@ -48,8 +47,6 @@ export declare class CardService implements ICardService {
|
|
|
48
47
|
requestBinInfo(binBody: BinBody, mid: string, isTest: boolean, regional: boolean): Observable<BinInfoResponse>;
|
|
49
48
|
validate3DS(body: Validate3DSRequest, mid: string, isTest: boolean, regional: boolean, callback: (value: Validate3DsResponse | ErrorResponse) => void): void;
|
|
50
49
|
requestSecureInit(request: SecureInitRequest, mid: string, isTest: boolean, regional: boolean): Observable<SecureInitResponse>;
|
|
51
|
-
setAlreadyObtainedToken(alreadyObtainedToken: boolean): void;
|
|
52
|
-
private _handleRetryRequestToken3DS;
|
|
53
50
|
private _getCreateSubscriptionDataToTransform;
|
|
54
51
|
private _request3DSToken;
|
|
55
52
|
private _setupCompleteCardinal;
|
|
@@ -44,7 +44,6 @@ let CardService = CardService_1 = class CardService {
|
|
|
44
44
|
this._3Dsecure = "active_3dsecure";
|
|
45
45
|
this._cardNumber = "card.number";
|
|
46
46
|
this._sandboxEnable = false;
|
|
47
|
-
this._alreadyObtainedToken = false;
|
|
48
47
|
this._gateway = gateway;
|
|
49
48
|
this._antiFraud = antiFraud;
|
|
50
49
|
this._authService = authService;
|
|
@@ -99,14 +98,10 @@ let CardService = CardService_1 = class CardService {
|
|
|
99
98
|
.subscribe({
|
|
100
99
|
error: (err) => Kushki_1.Kushki.callbackError(err, callback),
|
|
101
100
|
next: ([final_request, authorization, merchant]) => {
|
|
102
|
-
if (final_request.jwt && !merchant.sandboxEnable)
|
|
101
|
+
if (final_request.jwt && !merchant.sandboxEnable)
|
|
103
102
|
this._request3DSToken(isTest, () => {
|
|
104
|
-
window.Cardinal.off("payments.setupComplete");
|
|
105
|
-
// istanbul ignore next
|
|
106
103
|
this._requestTokenGateway(final_request, mid, isTest, regional, callback, authorization);
|
|
107
104
|
});
|
|
108
|
-
this._handleRetryRequestToken3DS(final_request, mid, isTest, regional, callback, authorization);
|
|
109
|
-
}
|
|
110
105
|
else
|
|
111
106
|
this._requestTokenGateway(final_request, mid, isTest, regional, callback, authorization);
|
|
112
107
|
},
|
|
@@ -223,24 +218,6 @@ let CardService = CardService_1 = class CardService {
|
|
|
223
218
|
jwt: jwt,
|
|
224
219
|
})));
|
|
225
220
|
}
|
|
226
|
-
setAlreadyObtainedToken(alreadyObtainedToken) {
|
|
227
|
-
this._alreadyObtainedToken = alreadyObtainedToken;
|
|
228
|
-
}
|
|
229
|
-
_handleRetryRequestToken3DS(finalRequest, mid, isTest, regional, callback, authorization) {
|
|
230
|
-
// istanbul ignore next
|
|
231
|
-
if (this._alreadyObtainedToken)
|
|
232
|
-
return;
|
|
233
|
-
window.Cardinal.complete({
|
|
234
|
-
Status: "Success",
|
|
235
|
-
})
|
|
236
|
-
.then(() => {
|
|
237
|
-
this._requestTokenGateway(finalRequest, mid, isTest, regional, callback, authorization);
|
|
238
|
-
})
|
|
239
|
-
.catch(() => {
|
|
240
|
-
const error = ErrorEnum_1.ERRORS[ErrorEnum_1.ErrorCode.E002];
|
|
241
|
-
Kushki_1.Kushki.callbackError(new KushkiError_1.KushkiError(error, ""), callback);
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
221
|
_getCreateSubscriptionDataToTransform(siftObject, subscriptionTokenRequest) {
|
|
245
222
|
if (siftObject.userId === null || siftObject.sessionId === null)
|
|
246
223
|
return Object.assign({}, subscriptionTokenRequest);
|
|
@@ -269,7 +246,6 @@ let CardService = CardService_1 = class CardService {
|
|
|
269
246
|
error: (err) => Kushki_1.Kushki.callbackError(err, callback),
|
|
270
247
|
next: (response) => {
|
|
271
248
|
callback(response);
|
|
272
|
-
this._alreadyObtainedToken = true;
|
|
273
249
|
},
|
|
274
250
|
});
|
|
275
251
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface CardAsyncTokenRequest {
|
|
5
5
|
totalAmount: number;
|
|
6
6
|
returnUrl: string;
|
|
7
|
-
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN";
|
|
7
|
+
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "BRL";
|
|
8
8
|
email?: string;
|
|
9
9
|
description?: string;
|
|
10
10
|
userId?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable:all */
|
|
2
2
|
/* tslint:disable:all */
|
|
3
3
|
|
|
4
|
-
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO";
|
|
4
|
+
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "BRL";
|
|
5
5
|
|
|
6
6
|
export interface DeviceTokenRequest {
|
|
7
7
|
subscriptionId: string;
|
|
@@ -10,7 +10,7 @@ export interface KushkiSubscriptionTokensRequest {
|
|
|
10
10
|
number: string;
|
|
11
11
|
[k: string]: any;
|
|
12
12
|
};
|
|
13
|
-
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN";
|
|
13
|
+
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "BRL";
|
|
14
14
|
userId?: string;
|
|
15
15
|
sessionId?: string;
|
|
16
16
|
savePaymentData?: boolean;
|
|
@@ -10,7 +10,7 @@ export interface KushkiTokensRequest {
|
|
|
10
10
|
number: string;
|
|
11
11
|
[k: string]: any;
|
|
12
12
|
};
|
|
13
|
-
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN";
|
|
13
|
+
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "BRL";
|
|
14
14
|
isDeferred?: boolean;
|
|
15
15
|
totalAmount: number;
|
|
16
16
|
rememberMe?: "0" | "1";
|
|
@@ -5,7 +5,7 @@ export interface MobileProcessorChargeRequest {
|
|
|
5
5
|
token: string;
|
|
6
6
|
softDescriptor: string;
|
|
7
7
|
amount: number;
|
|
8
|
-
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN";
|
|
8
|
+
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "BRL";
|
|
9
9
|
encodedPaymentToken: {
|
|
10
10
|
[k: string]: any;
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@ export interface MobileProcessorTokenRequest {
|
|
|
5
5
|
validationUrl: string;
|
|
6
6
|
totalAmount: number;
|
|
7
7
|
domainName: string;
|
|
8
|
-
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN";
|
|
8
|
+
currency: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "BRL";
|
|
9
9
|
description: string;
|
|
10
10
|
[k: string]: any;
|
|
11
11
|
}
|
|
@@ -6,7 +6,7 @@ export interface CommissionConfigurationAmount {
|
|
|
6
6
|
parentMerchantName: string;
|
|
7
7
|
commissionMerchantName: string;
|
|
8
8
|
amount: {
|
|
9
|
-
currency: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN";
|
|
9
|
+
currency: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "PAB" | "CRC" | "NIO" | "HNL" | "GTQ" | "BRL";
|
|
10
10
|
iva: number;
|
|
11
11
|
subtotalIva: number;
|
|
12
12
|
subtotalIva0: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable:all */
|
|
2
2
|
/* tslint:disable:all */
|
|
3
3
|
|
|
4
|
-
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO";
|
|
4
|
+
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "BRL";
|
|
5
5
|
|
|
6
6
|
export interface SubscriptionIdRequest {
|
|
7
7
|
subscriptionId: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
export interface SubscriptionTokenKPayRequest {
|
|
5
5
|
walletId: string;
|
|
6
|
-
currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "PAB";
|
|
6
|
+
currency?: "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "PAB" | "BRL";
|
|
7
7
|
userId?: string;
|
|
8
8
|
sessionId?: string;
|
|
9
9
|
card?: {
|
|
@@ -10,7 +10,7 @@ export interface SubscriptionTokenRequest {
|
|
|
10
10
|
number: string;
|
|
11
11
|
[k: string]: any;
|
|
12
12
|
};
|
|
13
|
-
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO";
|
|
13
|
+
currency?: "USD" | "COP" | "PEN" | "CLP" | "UF" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "BRL";
|
|
14
14
|
savePaymentData?: boolean;
|
|
15
15
|
emailRequest?: string;
|
|
16
16
|
[k: string]: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable:all */
|
|
2
2
|
/* tslint:disable:all */
|
|
3
3
|
|
|
4
|
-
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO";
|
|
4
|
+
export type Currency = "USD" | "COP" | "CLP" | "UF" | "PEN" | "MXN" | "CRC" | "GTQ" | "HNL" | "NIO" | "BRL";
|
|
5
5
|
|
|
6
6
|
export interface TokenChargeRequest {
|
|
7
7
|
subscriptionId: string;
|