@pelcro/react-pelcro-js 4.0.0-alpha.68 → 4.0.0-alpha.69
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 +21 -10
- package/dist/index.esm.js +21 -10
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -24382,8 +24382,6 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24382
24382
|
};
|
|
24383
24383
|
|
|
24384
24384
|
const handlePaymentError = error => {
|
|
24385
|
-
var _getErrorMessages;
|
|
24386
|
-
|
|
24387
24385
|
toggleAuthenticationSuccessPendingView(false);
|
|
24388
24386
|
|
|
24389
24387
|
if (error.type === "validation_error" && // Subscription creation & renewal
|
|
@@ -24399,14 +24397,26 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24399
24397
|
}
|
|
24400
24398
|
}
|
|
24401
24399
|
|
|
24402
|
-
|
|
24403
|
-
|
|
24404
|
-
|
|
24405
|
-
|
|
24406
|
-
|
|
24407
|
-
|
|
24408
|
-
|
|
24409
|
-
|
|
24400
|
+
if (error.type == "invalid_request_error" && error.param == "billing_details[address]" && error.code == "parameter_missing") {
|
|
24401
|
+
dispatch({
|
|
24402
|
+
type: SHOW_ALERT,
|
|
24403
|
+
payload: {
|
|
24404
|
+
type: "error",
|
|
24405
|
+
content: "Billing address is required to complete your purchase. Please provide your billing address."
|
|
24406
|
+
}
|
|
24407
|
+
});
|
|
24408
|
+
} else {
|
|
24409
|
+
var _getErrorMessages;
|
|
24410
|
+
|
|
24411
|
+
dispatch({
|
|
24412
|
+
type: SHOW_ALERT,
|
|
24413
|
+
payload: {
|
|
24414
|
+
type: "error",
|
|
24415
|
+
content: (_getErrorMessages = getErrorMessages(error)) !== null && _getErrorMessages !== void 0 ? _getErrorMessages : error === null || error === void 0 ? void 0 : error.message
|
|
24416
|
+
}
|
|
24417
|
+
});
|
|
24418
|
+
}
|
|
24419
|
+
|
|
24410
24420
|
dispatch({
|
|
24411
24421
|
type: DISABLE_SUBMIT,
|
|
24412
24422
|
payload: false
|
|
@@ -24415,6 +24425,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24415
24425
|
type: LOADING,
|
|
24416
24426
|
payload: false
|
|
24417
24427
|
});
|
|
24428
|
+
onFailure(error);
|
|
24418
24429
|
}; // TODO: Refactor deprecated stripe implementation
|
|
24419
24430
|
|
|
24420
24431
|
/* Start Stripe deprecated functions */
|
package/dist/index.esm.js
CHANGED
|
@@ -24352,8 +24352,6 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24352
24352
|
};
|
|
24353
24353
|
|
|
24354
24354
|
const handlePaymentError = error => {
|
|
24355
|
-
var _getErrorMessages;
|
|
24356
|
-
|
|
24357
24355
|
toggleAuthenticationSuccessPendingView(false);
|
|
24358
24356
|
|
|
24359
24357
|
if (error.type === "validation_error" && // Subscription creation & renewal
|
|
@@ -24369,14 +24367,26 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24369
24367
|
}
|
|
24370
24368
|
}
|
|
24371
24369
|
|
|
24372
|
-
|
|
24373
|
-
|
|
24374
|
-
|
|
24375
|
-
|
|
24376
|
-
|
|
24377
|
-
|
|
24378
|
-
|
|
24379
|
-
|
|
24370
|
+
if (error.type == "invalid_request_error" && error.param == "billing_details[address]" && error.code == "parameter_missing") {
|
|
24371
|
+
dispatch({
|
|
24372
|
+
type: SHOW_ALERT,
|
|
24373
|
+
payload: {
|
|
24374
|
+
type: "error",
|
|
24375
|
+
content: "Billing address is required to complete your purchase. Please provide your billing address."
|
|
24376
|
+
}
|
|
24377
|
+
});
|
|
24378
|
+
} else {
|
|
24379
|
+
var _getErrorMessages;
|
|
24380
|
+
|
|
24381
|
+
dispatch({
|
|
24382
|
+
type: SHOW_ALERT,
|
|
24383
|
+
payload: {
|
|
24384
|
+
type: "error",
|
|
24385
|
+
content: (_getErrorMessages = getErrorMessages(error)) !== null && _getErrorMessages !== void 0 ? _getErrorMessages : error === null || error === void 0 ? void 0 : error.message
|
|
24386
|
+
}
|
|
24387
|
+
});
|
|
24388
|
+
}
|
|
24389
|
+
|
|
24380
24390
|
dispatch({
|
|
24381
24391
|
type: DISABLE_SUBMIT,
|
|
24382
24392
|
payload: false
|
|
@@ -24385,6 +24395,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
24385
24395
|
type: LOADING,
|
|
24386
24396
|
payload: false
|
|
24387
24397
|
});
|
|
24398
|
+
onFailure(error);
|
|
24388
24399
|
}; // TODO: Refactor deprecated stripe implementation
|
|
24389
24400
|
|
|
24390
24401
|
/* Start Stripe deprecated functions */
|