@flopay/react 0.5.0 → 0.5.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.cjs +16 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1060,6 +1060,10 @@ function SplitCardFormInner({
|
|
|
1060
1060
|
avsLayout: avsLayoutProp = "row",
|
|
1061
1061
|
country: countryProp,
|
|
1062
1062
|
zip: zipProp,
|
|
1063
|
+
addressLine1: addressLine1Prop,
|
|
1064
|
+
addressLine2: addressLine2Prop,
|
|
1065
|
+
city: cityProp,
|
|
1066
|
+
state: stateProp,
|
|
1063
1067
|
onCountryChange,
|
|
1064
1068
|
onZipChange,
|
|
1065
1069
|
avsCheck: avsCheckProp,
|
|
@@ -1080,17 +1084,17 @@ function SplitCardFormInner({
|
|
|
1080
1084
|
const [is3DSActive, setIs3DSActive] = (0, import_react7.useState)(false);
|
|
1081
1085
|
const [selectedCountry, setSelectedCountry] = (0, import_react7.useState)(countryProp ?? "US");
|
|
1082
1086
|
const [zipCode, setZipCode] = (0, import_react7.useState)(zipProp ?? "");
|
|
1083
|
-
const [addressLine1, setAddressLine1] = (0, import_react7.useState)("");
|
|
1084
|
-
const [addressLine2, setAddressLine2] = (0, import_react7.useState)("");
|
|
1085
|
-
const [city, setCity] = (0, import_react7.useState)("");
|
|
1086
|
-
const [stateValue, setStateValue] = (0, import_react7.useState)("");
|
|
1087
|
+
const [addressLine1, setAddressLine1] = (0, import_react7.useState)(addressLine1Prop ?? "");
|
|
1088
|
+
const [addressLine2, setAddressLine2] = (0, import_react7.useState)(addressLine2Prop ?? "");
|
|
1089
|
+
const [city, setCity] = (0, import_react7.useState)(cityProp ?? "");
|
|
1090
|
+
const [stateValue, setStateValue] = (0, import_react7.useState)(stateProp ?? "");
|
|
1087
1091
|
const [accountPatch, setAccountPatch] = (0, import_react7.useState)({});
|
|
1088
1092
|
const zipCodeRef = (0, import_react7.useRef)(zipProp ?? "");
|
|
1089
1093
|
const selectedCountryRef = (0, import_react7.useRef)(countryProp ?? "US");
|
|
1090
|
-
const addressLine1Ref = (0, import_react7.useRef)("");
|
|
1091
|
-
const addressLine2Ref = (0, import_react7.useRef)("");
|
|
1092
|
-
const cityRef = (0, import_react7.useRef)("");
|
|
1093
|
-
const stateRef = (0, import_react7.useRef)("");
|
|
1094
|
+
const addressLine1Ref = (0, import_react7.useRef)(addressLine1Prop ?? "");
|
|
1095
|
+
const addressLine2Ref = (0, import_react7.useRef)(addressLine2Prop ?? "");
|
|
1096
|
+
const cityRef = (0, import_react7.useRef)(cityProp ?? "");
|
|
1097
|
+
const stateRef = (0, import_react7.useRef)(stateProp ?? "");
|
|
1094
1098
|
const avsConfig = (0, import_react7.useMemo)(() => (0, import_shared4.resolveAVSConfig)(enableAVSProp), [enableAVSProp]);
|
|
1095
1099
|
const enableAVS = avsConfig !== null;
|
|
1096
1100
|
const [viewState, setViewState] = (0, import_react7.useState)(initialCardOpen ? "card" : "buttons");
|
|
@@ -3572,6 +3576,10 @@ function FloPayCheckout({
|
|
|
3572
3576
|
enableAVS,
|
|
3573
3577
|
avsLayout,
|
|
3574
3578
|
country: session?.customer?.country,
|
|
3579
|
+
city: session?.customer?.city,
|
|
3580
|
+
state: session?.customer?.state,
|
|
3581
|
+
addressLine1: session?.customer?.line1,
|
|
3582
|
+
addressLine2: session?.customer?.line2,
|
|
3575
3583
|
onCountryChange,
|
|
3576
3584
|
onZipChange,
|
|
3577
3585
|
avsCheck: !!enableAVS,
|