@kushki/js 1.28.0-sift-alpha.1 → 1.28.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.
|
@@ -257,7 +257,7 @@ var CardService = /** @class */ (function () {
|
|
|
257
257
|
var _this = this;
|
|
258
258
|
return rxjs_1.of(1).pipe(operators_1.switchMap(function () {
|
|
259
259
|
if (request.card && request.card.number !== undefined)
|
|
260
|
-
return _this._antiFraud.createSiftScienceSession(UtilsService_1.
|
|
260
|
+
return _this._antiFraud.createSiftScienceSession(UtilsService_1.getBinFromCreditCardNumberSift(request.card.number), request.card.number.slice(-4), mid, isTest, merchant);
|
|
261
261
|
return rxjs_1.of({
|
|
262
262
|
sessionId: null,
|
|
263
263
|
userId: null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.getBinFromCreditCardNumber = exports.UtilsService = void 0;
|
|
3
|
+
exports.getBinFromCreditCardNumberSift = exports.getBinFromCreditCardNumber = exports.UtilsService = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* UtilsService Class
|
|
6
6
|
*/
|
|
@@ -64,3 +64,8 @@ function getBinFromCreditCardNumber(value) {
|
|
|
64
64
|
return card_value.slice(CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardInitialBinPlace, CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardFinalBinPlace);
|
|
65
65
|
}
|
|
66
66
|
exports.getBinFromCreditCardNumber = getBinFromCreditCardNumber;
|
|
67
|
+
function getBinFromCreditCardNumberSift(value) {
|
|
68
|
+
var card_value = value.replace(/\D/g, "");
|
|
69
|
+
return card_value.slice(CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardInitialBinPlace, CreditCardEspecifications_1.CREDIT_CARD_ESPECIFICATIONS.cardFinalBinPlaceSift);
|
|
70
|
+
}
|
|
71
|
+
exports.getBinFromCreditCardNumberSift = getBinFromCreditCardNumberSift;
|