@flopay/react 0.5.16 → 0.5.17
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/README.md +27 -0
- package/dist/index.cjs +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3572,6 +3572,11 @@ function FloPayCheckout({
|
|
|
3572
3572
|
onSessionCompletedRef.current?.(sess.successUrl ?? "");
|
|
3573
3573
|
return;
|
|
3574
3574
|
}
|
|
3575
|
+
if (sess.status === "expired") {
|
|
3576
|
+
throw new FloPayError4("Checkout session has expired.", "api_error", {
|
|
3577
|
+
code: "checkout_session_expired"
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3575
3580
|
const effectiveMode = checkoutModeProp ?? sess.checkoutMode ?? "full";
|
|
3576
3581
|
setCurrentMode(effectiveMode);
|
|
3577
3582
|
const hasPayPalRedirectParams = typeof window !== "undefined" && new URLSearchParams(window.location.search).has("payment_intent");
|
|
@@ -3743,8 +3748,10 @@ function FloPayCheckout({
|
|
|
3743
3748
|
] });
|
|
3744
3749
|
}
|
|
3745
3750
|
if (loadError) {
|
|
3746
|
-
if (errorNode)
|
|
3747
|
-
|
|
3751
|
+
if (errorNode) {
|
|
3752
|
+
return /* @__PURE__ */ jsx7(CheckoutContext.Provider, { value: checkoutValue, children: errorNode(loadError) });
|
|
3753
|
+
}
|
|
3754
|
+
return /* @__PURE__ */ jsx7(CheckoutContext.Provider, { value: checkoutValue, children: /* @__PURE__ */ jsx7(
|
|
3748
3755
|
"div",
|
|
3749
3756
|
{
|
|
3750
3757
|
style: {
|
|
@@ -3755,7 +3762,7 @@ function FloPayCheckout({
|
|
|
3755
3762
|
},
|
|
3756
3763
|
children: loadError.message
|
|
3757
3764
|
}
|
|
3758
|
-
);
|
|
3765
|
+
) });
|
|
3759
3766
|
}
|
|
3760
3767
|
if (shouldShowInterimButtons) {
|
|
3761
3768
|
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
@@ -4894,6 +4901,11 @@ function FloPayAutomaticPaymentButton({
|
|
|
4894
4901
|
});
|
|
4895
4902
|
return;
|
|
4896
4903
|
}
|
|
4904
|
+
if (session.status === "expired") {
|
|
4905
|
+
throw new FloPayError7("Checkout session has expired.", "api_error", {
|
|
4906
|
+
code: "checkout_session_expired"
|
|
4907
|
+
});
|
|
4908
|
+
}
|
|
4897
4909
|
try {
|
|
4898
4910
|
let paymentResult = null;
|
|
4899
4911
|
const redirectResult = getRedirectResultFromCheckoutProcessError(apiResult.autoProcessingError);
|