@nozle-js/react 0.7.0 → 0.8.0
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 +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var BillingContext = React.createContext(null);
|
|
|
31
31
|
function BillingProvider({
|
|
32
32
|
publishableKey,
|
|
33
33
|
createCheckout,
|
|
34
|
-
baseUrl = "https://api.nozle.app",
|
|
34
|
+
baseUrl = "https://api.nozle.app/engine",
|
|
35
35
|
children
|
|
36
36
|
}) {
|
|
37
37
|
if (!publishableKey.startsWith("pk_")) {
|
|
@@ -879,6 +879,7 @@ function CheckoutInner({
|
|
|
879
879
|
onReady,
|
|
880
880
|
className,
|
|
881
881
|
style,
|
|
882
|
+
returnUrl,
|
|
882
883
|
children
|
|
883
884
|
}) {
|
|
884
885
|
const stripe = reactStripeJs.useStripe();
|
|
@@ -892,7 +893,7 @@ function CheckoutInner({
|
|
|
892
893
|
setError(null);
|
|
893
894
|
const result = await stripe.confirmPayment({
|
|
894
895
|
elements,
|
|
895
|
-
confirmParams: { return_url: window.location.href },
|
|
896
|
+
confirmParams: { return_url: returnUrl ?? window.location.href },
|
|
896
897
|
redirect: "if_required"
|
|
897
898
|
});
|
|
898
899
|
setIsProcessing(false);
|
|
@@ -957,6 +958,7 @@ function Checkout({
|
|
|
957
958
|
clientSecret,
|
|
958
959
|
publishableKey,
|
|
959
960
|
stripeAccount,
|
|
961
|
+
returnUrl,
|
|
960
962
|
submitLabel,
|
|
961
963
|
onSuccess,
|
|
962
964
|
onComplete,
|
|
@@ -988,6 +990,7 @@ function Checkout({
|
|
|
988
990
|
onReady,
|
|
989
991
|
className,
|
|
990
992
|
style,
|
|
993
|
+
returnUrl,
|
|
991
994
|
children
|
|
992
995
|
}
|
|
993
996
|
) }, clientSecret);
|