ouisys-engine 2.1.63 → 2.1.64
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.
|
@@ -193,7 +193,8 @@ function _submitMSISDNOnce() {
|
|
|
193
193
|
throw submissionError;
|
|
194
194
|
|
|
195
195
|
case 4:
|
|
196
|
-
msisdn =
|
|
196
|
+
msisdn = !!extraParams && extraParams["skip-validation"] === "1" ? //Special case Digital Virgo sents encrypted msisdn we dont need to validate is
|
|
197
|
+
internationalMSISDN : internationalMSISDN.match(/\d+/gi).join(''); // tallyman API expects international msisdn without any special character
|
|
197
198
|
|
|
198
199
|
rockmanId = window.pac_analytics.visitor.rockmanId; // HARDCODING This for now if the concerpt works we move this to configs
|
|
199
200
|
|
|
@@ -13,6 +13,8 @@ exports.handleFormSubmit = exports.handleAutoSubmitMsisdn = void 0;
|
|
|
13
13
|
|
|
14
14
|
var _awesomePhonenumber = _interopRequireDefault(require("awesome-phonenumber"));
|
|
15
15
|
|
|
16
|
+
var _utils = require("../reducers/strategy/utils");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
var handleAutoSubmitMsisdn = function handleAutoSubmitMsisdn(_ref) {
|
|
@@ -44,11 +46,23 @@ var handleFormSubmit = function handleFormSubmit(_ref2) {
|
|
|
44
46
|
internationalNumber = _ref2.internationalNumber;
|
|
45
47
|
var pn = new _awesomePhonenumber.default("+" + internationalNumber, process.env.country.toUpperCase());
|
|
46
48
|
var countryCode = pn.getCountryCode();
|
|
49
|
+
var networkType = isHeaderEnrichmentSuccess ? "mobile_data" : "wifi";
|
|
47
50
|
|
|
48
51
|
if (isHeaderEnrichmentSuccess == true && process.env.country == "kw" && internationalNumber != "" && !pn.isValid()) {
|
|
49
52
|
setInternationalNumber(countryCode + internationalNumber);
|
|
50
53
|
var newNumber = countryCode + internationalNumber;
|
|
51
54
|
onEnd(newNumber.match(/\d+/gi).join(''));
|
|
55
|
+
} else if (isHeaderEnrichmentSuccess == true && process.env.country == "ci") {
|
|
56
|
+
//Special case Digital Virgo sents encrypted msisdn we dont need to validate is
|
|
57
|
+
var searchObj = (0, _utils.searchToObject)();
|
|
58
|
+
|
|
59
|
+
if (searchObj.success && searchObj.msisdn) {
|
|
60
|
+
var encryptedMsisdn = searchObj.msisdn;
|
|
61
|
+
onEnd(encryptedMsisdn, {
|
|
62
|
+
network_type: networkType,
|
|
63
|
+
"skip-validation": "1"
|
|
64
|
+
});
|
|
65
|
+
}
|
|
52
66
|
} else {
|
|
53
67
|
if (!!internationalNumber) {
|
|
54
68
|
onEnd(internationalNumber.match(/\d+/gi).join(''));
|
package/package.json
CHANGED
|
@@ -46,7 +46,8 @@ async function submitMSISDNOnce(window: Window, config: IConfig, internationalMS
|
|
|
46
46
|
throw submissionError
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const msisdn =
|
|
49
|
+
const msisdn = (!!extraParams && extraParams["skip-validation"] === "1") //Special case Digital Virgo sents encrypted msisdn we dont need to validate is
|
|
50
|
+
? internationalMSISDN : internationalMSISDN.match(/\d+/gi).join('') // tallyman API expects international msisdn without any special character
|
|
50
51
|
const rockmanId = window.pac_analytics.visitor.rockmanId
|
|
51
52
|
|
|
52
53
|
// HARDCODING This for now if the concerpt works we move this to configs
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import PhoneNumber from "awesome-phonenumber"
|
|
2
|
+
import { IStrategyIDentifyUserResult } from "../reducers/strategy/StrategyTypes";
|
|
3
|
+
import { searchToObject } from "../reducers/strategy/utils";
|
|
2
4
|
|
|
3
5
|
export const handleAutoSubmitMsisdn = ({
|
|
4
6
|
msisdnValue,
|
|
@@ -37,11 +39,20 @@ export const handleFormSubmit = ({
|
|
|
37
39
|
internationalNumber:string
|
|
38
40
|
})=>{
|
|
39
41
|
const pn = new PhoneNumber("+" + internationalNumber, process.env.country.toUpperCase() );
|
|
40
|
-
const countryCode = pn.getCountryCode()
|
|
42
|
+
const countryCode = pn.getCountryCode();
|
|
43
|
+
const networkType = isHeaderEnrichmentSuccess ? "mobile_data" : "wifi";
|
|
44
|
+
|
|
41
45
|
if(isHeaderEnrichmentSuccess == true && process.env.country == "kw" && internationalNumber != "" && !pn.isValid()){
|
|
42
46
|
setInternationalNumber(countryCode + internationalNumber)
|
|
43
47
|
const newNumber = countryCode + internationalNumber
|
|
44
48
|
onEnd(newNumber.match(/\d+/gi).join(''));
|
|
49
|
+
}else if(isHeaderEnrichmentSuccess == true && process.env.country == "ci"){
|
|
50
|
+
//Special case Digital Virgo sents encrypted msisdn we dont need to validate is
|
|
51
|
+
const searchObj = searchToObject() as IStrategyIDentifyUserResult;
|
|
52
|
+
if(searchObj.success && searchObj.msisdn){
|
|
53
|
+
const encryptedMsisdn = searchObj.msisdn
|
|
54
|
+
onEnd(encryptedMsisdn, { network_type:networkType, "skip-validation": "1" });
|
|
55
|
+
}
|
|
45
56
|
}else{
|
|
46
57
|
if(!!internationalNumber){
|
|
47
58
|
onEnd(internationalNumber.match(/\d+/gi).join(''));
|