@pelcro/react-pelcro-js 2.7.0-beta.8 → 2.7.0-beta.9
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 +42 -3
- package/dist/index.esm.js +42 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13021,10 +13021,49 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13021
13021
|
|
|
13022
13022
|
if (err) {
|
|
13023
13023
|
onFailure(err);
|
|
13024
|
-
|
|
13024
|
+
dispatch({
|
|
13025
13025
|
type: SET_COUPON_ERROR,
|
|
13026
13026
|
payload: getErrorMessages(err)
|
|
13027
|
+
}); // remove current coupon
|
|
13028
|
+
|
|
13029
|
+
dispatch({
|
|
13030
|
+
type: SET_COUPON,
|
|
13031
|
+
payload: null
|
|
13032
|
+
});
|
|
13033
|
+
dispatch({
|
|
13034
|
+
type: SET_PERCENT_OFF,
|
|
13035
|
+
payload: ""
|
|
13027
13036
|
});
|
|
13037
|
+
dispatch({
|
|
13038
|
+
type: SET_UPDATED_PRICE,
|
|
13039
|
+
payload: null
|
|
13040
|
+
});
|
|
13041
|
+
dispatch({
|
|
13042
|
+
type: SET_TAX_AMOUNT,
|
|
13043
|
+
payload: null
|
|
13044
|
+
});
|
|
13045
|
+
const {
|
|
13046
|
+
currentPlan
|
|
13047
|
+
} = state;
|
|
13048
|
+
|
|
13049
|
+
if (currentPlan) {
|
|
13050
|
+
var _currentPlan$quantity;
|
|
13051
|
+
|
|
13052
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13053
|
+
const price = currentPlan.amount;
|
|
13054
|
+
dispatch({
|
|
13055
|
+
type: SET_UPDATED_PRICE,
|
|
13056
|
+
// set original plan price
|
|
13057
|
+
payload: price * quantity
|
|
13058
|
+
});
|
|
13059
|
+
dispatch({
|
|
13060
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13061
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13062
|
+
|
|
13063
|
+
updateTotalAmountWithTax();
|
|
13064
|
+
}
|
|
13065
|
+
|
|
13066
|
+
return;
|
|
13028
13067
|
}
|
|
13029
13068
|
|
|
13030
13069
|
dispatch({
|
|
@@ -13145,9 +13184,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13145
13184
|
} = state;
|
|
13146
13185
|
|
|
13147
13186
|
if (currentPlan) {
|
|
13148
|
-
var _currentPlan$
|
|
13187
|
+
var _currentPlan$quantity2;
|
|
13149
13188
|
|
|
13150
|
-
const quantity = (_currentPlan$
|
|
13189
|
+
const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
|
|
13151
13190
|
const price = currentPlan.amount;
|
|
13152
13191
|
dispatch({
|
|
13153
13192
|
type: SET_UPDATED_PRICE,
|
package/dist/index.esm.js
CHANGED
|
@@ -12991,10 +12991,49 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12991
12991
|
|
|
12992
12992
|
if (err) {
|
|
12993
12993
|
onFailure(err);
|
|
12994
|
-
|
|
12994
|
+
dispatch({
|
|
12995
12995
|
type: SET_COUPON_ERROR,
|
|
12996
12996
|
payload: getErrorMessages(err)
|
|
12997
|
+
}); // remove current coupon
|
|
12998
|
+
|
|
12999
|
+
dispatch({
|
|
13000
|
+
type: SET_COUPON,
|
|
13001
|
+
payload: null
|
|
13002
|
+
});
|
|
13003
|
+
dispatch({
|
|
13004
|
+
type: SET_PERCENT_OFF,
|
|
13005
|
+
payload: ""
|
|
12997
13006
|
});
|
|
13007
|
+
dispatch({
|
|
13008
|
+
type: SET_UPDATED_PRICE,
|
|
13009
|
+
payload: null
|
|
13010
|
+
});
|
|
13011
|
+
dispatch({
|
|
13012
|
+
type: SET_TAX_AMOUNT,
|
|
13013
|
+
payload: null
|
|
13014
|
+
});
|
|
13015
|
+
const {
|
|
13016
|
+
currentPlan
|
|
13017
|
+
} = state;
|
|
13018
|
+
|
|
13019
|
+
if (currentPlan) {
|
|
13020
|
+
var _currentPlan$quantity;
|
|
13021
|
+
|
|
13022
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13023
|
+
const price = currentPlan.amount;
|
|
13024
|
+
dispatch({
|
|
13025
|
+
type: SET_UPDATED_PRICE,
|
|
13026
|
+
// set original plan price
|
|
13027
|
+
payload: price * quantity
|
|
13028
|
+
});
|
|
13029
|
+
dispatch({
|
|
13030
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13031
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13032
|
+
|
|
13033
|
+
updateTotalAmountWithTax();
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
return;
|
|
12998
13037
|
}
|
|
12999
13038
|
|
|
13000
13039
|
dispatch({
|
|
@@ -13115,9 +13154,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13115
13154
|
} = state;
|
|
13116
13155
|
|
|
13117
13156
|
if (currentPlan) {
|
|
13118
|
-
var _currentPlan$
|
|
13157
|
+
var _currentPlan$quantity2;
|
|
13119
13158
|
|
|
13120
|
-
const quantity = (_currentPlan$
|
|
13159
|
+
const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
|
|
13121
13160
|
const price = currentPlan.amount;
|
|
13122
13161
|
dispatch({
|
|
13123
13162
|
type: SET_UPDATED_PRICE,
|