summit-registration-lite 6.0.4-beta.1 → 6.0.5-beta.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.
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1981,6 +1981,12 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
|
|
1983
1983
|
case DELETE_RESERVATION_SUCCESS:
|
|
1984
|
+
{
|
|
1985
|
+
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
1986
|
+
reservation: null
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1984
1990
|
case CLEAR_RESERVATION:
|
|
1985
1991
|
{
|
|
1986
1992
|
return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
|
|
@@ -2566,20 +2572,22 @@ const StripeForm = ({
|
|
|
2566
2572
|
let createPaymentMethodOptions = {
|
|
2567
2573
|
elements
|
|
2568
2574
|
};
|
|
2575
|
+
let address = {}; // stripe payment payload requires data that's not an empty string
|
|
2576
|
+
|
|
2577
|
+
if (userProfile.locality) address.city = userProfile.locality;
|
|
2578
|
+
if (userProfile.country) address.country = userProfile.country;
|
|
2579
|
+
if (userProfile.address1) address.line1 = userProfile.address1;
|
|
2580
|
+
if (userProfile.address2) address.line2 = userProfile.address2;
|
|
2581
|
+
if (!hidePostalCode && userProfile.postal_code) address.postal_code = userProfile.postal_code;
|
|
2582
|
+
if (userProfile.region) address.state = userProfile.region;
|
|
2569
2583
|
createPaymentMethodOptions = stripe_form_objectSpread(stripe_form_objectSpread({}, createPaymentMethodOptions), {}, {
|
|
2570
2584
|
params: {
|
|
2571
|
-
billing_details: {
|
|
2572
|
-
address
|
|
2573
|
-
|
|
2574
|
-
country: userProfile.country || "",
|
|
2575
|
-
line1: userProfile.address1 || "",
|
|
2576
|
-
line2: userProfile.address2 || "",
|
|
2577
|
-
postal_code: hidePostalCode ? "" : userProfile.postal_code || "",
|
|
2578
|
-
state: userProfile.region || ""
|
|
2579
|
-
},
|
|
2585
|
+
billing_details: stripe_form_objectSpread(stripe_form_objectSpread({}, Object.keys(address).length > 0 && {
|
|
2586
|
+
address
|
|
2587
|
+
}), {}, {
|
|
2580
2588
|
email: userProfile.email,
|
|
2581
2589
|
name: `${reservation.owner_first_name} ${reservation.owner_last_name}`
|
|
2582
|
-
}
|
|
2590
|
+
})
|
|
2583
2591
|
}
|
|
2584
2592
|
});
|
|
2585
2593
|
const {
|