@pelcro/react-pelcro-js 3.23.0-beta.2 → 3.23.0-beta.3
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/dist/index.cjs.js +19 -12
- package/dist/index.esm.js +19 -12
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -17427,19 +17427,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
17427
17427
|
|
|
17428
17428
|
/*====== Start Cybersource integration ========*/
|
|
17429
17429
|
const cybersourceErrorHandle = err => {
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17430
|
+
console.log("Starting handling the error");
|
|
17431
|
+
if (err.details.length > 0) {
|
|
17432
|
+
var _err$details, _err$details$response;
|
|
17433
|
+
console.log("error.details has items");
|
|
17434
|
+
const errorMessages = [];
|
|
17435
|
+
|
|
17436
|
+
// enumerable error (ex: validation errors)
|
|
17437
|
+
Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
|
|
17438
|
+
let {
|
|
17439
|
+
message
|
|
17440
|
+
} = _ref2;
|
|
17441
|
+
errorMessages.push(message);
|
|
17442
|
+
});
|
|
17440
17443
|
|
|
17441
|
-
|
|
17442
|
-
|
|
17444
|
+
// convert to multiline string
|
|
17445
|
+
return errorMessages.join("\n");
|
|
17446
|
+
} else {
|
|
17447
|
+
console.log("Handling the error the normal way");
|
|
17448
|
+
return getErrorMessages(err);
|
|
17449
|
+
}
|
|
17443
17450
|
};
|
|
17444
17451
|
const submitUsingCybersource = (state, dispatch) => {
|
|
17445
17452
|
var _cybersourceInstanceR;
|
package/dist/index.esm.js
CHANGED
|
@@ -17397,19 +17397,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
17397
17397
|
|
|
17398
17398
|
/*====== Start Cybersource integration ========*/
|
|
17399
17399
|
const cybersourceErrorHandle = err => {
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17400
|
+
console.log("Starting handling the error");
|
|
17401
|
+
if (err.details.length > 0) {
|
|
17402
|
+
var _err$details, _err$details$response;
|
|
17403
|
+
console.log("error.details has items");
|
|
17404
|
+
const errorMessages = [];
|
|
17405
|
+
|
|
17406
|
+
// enumerable error (ex: validation errors)
|
|
17407
|
+
Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
|
|
17408
|
+
let {
|
|
17409
|
+
message
|
|
17410
|
+
} = _ref2;
|
|
17411
|
+
errorMessages.push(message);
|
|
17412
|
+
});
|
|
17410
17413
|
|
|
17411
|
-
|
|
17412
|
-
|
|
17414
|
+
// convert to multiline string
|
|
17415
|
+
return errorMessages.join("\n");
|
|
17416
|
+
} else {
|
|
17417
|
+
console.log("Handling the error the normal way");
|
|
17418
|
+
return getErrorMessages(err);
|
|
17419
|
+
}
|
|
17413
17420
|
};
|
|
17414
17421
|
const submitUsingCybersource = (state, dispatch) => {
|
|
17415
17422
|
var _cybersourceInstanceR;
|