@solvapay/react 1.0.8-preview.5 → 1.0.8-preview.6

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.
@@ -1966,6 +1966,13 @@ async function confirmPayment(input) {
1966
1966
  if (!paymentElement) {
1967
1967
  return { status: "error", message: copy.errors.cardElementMissing };
1968
1968
  }
1969
+ const { error: submitError } = await elements.submit();
1970
+ if (submitError) {
1971
+ return {
1972
+ status: "error",
1973
+ message: submitError.message || copy.errors.paymentUnexpected
1974
+ };
1975
+ }
1969
1976
  const { error: error2, paymentIntent: paymentIntent2 } = await stripe.confirmPayment({
1970
1977
  elements,
1971
1978
  clientSecret,
@@ -3211,6 +3218,14 @@ var Inner = ({
3211
3218
  }
3212
3219
  setError(null);
3213
3220
  setIsProcessing(true);
3221
+ const { error: submitError } = await elements.submit();
3222
+ if (submitError) {
3223
+ const msg = submitError.message || copy.errors.paymentUnexpected;
3224
+ setError(msg);
3225
+ setIsProcessing(false);
3226
+ onError?.(new Error(msg));
3227
+ return;
3228
+ }
3214
3229
  const { error: confirmError, paymentIntent } = await stripe.confirmPayment({
3215
3230
  elements,
3216
3231
  clientSecret,
package/dist/index.cjs CHANGED
@@ -2077,6 +2077,13 @@ async function confirmPayment(input) {
2077
2077
  if (!paymentElement) {
2078
2078
  return { status: "error", message: copy.errors.cardElementMissing };
2079
2079
  }
2080
+ const { error: submitError } = await elements.submit();
2081
+ if (submitError) {
2082
+ return {
2083
+ status: "error",
2084
+ message: submitError.message || copy.errors.paymentUnexpected
2085
+ };
2086
+ }
2080
2087
  const { error: error2, paymentIntent: paymentIntent2 } = await stripe.confirmPayment({
2081
2088
  elements,
2082
2089
  clientSecret,
@@ -3311,6 +3318,14 @@ var Inner = ({
3311
3318
  }
3312
3319
  setError(null);
3313
3320
  setIsProcessing(true);
3321
+ const { error: submitError } = await elements.submit();
3322
+ if (submitError) {
3323
+ const msg = submitError.message || copy.errors.paymentUnexpected;
3324
+ setError(msg);
3325
+ setIsProcessing(false);
3326
+ onError?.(new Error(msg));
3327
+ return;
3328
+ }
3314
3329
  const { error: confirmError, paymentIntent } = await stripe.confirmPayment({
3315
3330
  elements,
3316
3331
  clientSecret,
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import {
64
64
  useSolvaPay,
65
65
  useTopup,
66
66
  useTopupAmountSelector
67
- } from "./chunk-Q7GPX6X4.js";
67
+ } from "./chunk-5FZBOPIW.js";
68
68
  import {
69
69
  defaultAuthAdapter
70
70
  } from "./chunk-OUSEQRCT.js";
@@ -1866,6 +1866,13 @@ async function confirmPayment(input) {
1866
1866
  if (!paymentElement) {
1867
1867
  return { status: "error", message: copy.errors.cardElementMissing };
1868
1868
  }
1869
+ const { error: submitError } = await elements.submit();
1870
+ if (submitError) {
1871
+ return {
1872
+ status: "error",
1873
+ message: submitError.message || copy.errors.paymentUnexpected
1874
+ };
1875
+ }
1869
1876
  const { error: error2, paymentIntent: paymentIntent2 } = await stripe.confirmPayment({
1870
1877
  elements,
1871
1878
  clientSecret,
@@ -3746,6 +3753,14 @@ var Inner = ({
3746
3753
  }
3747
3754
  setError(null);
3748
3755
  setIsProcessing(true);
3756
+ const { error: submitError } = await elements.submit();
3757
+ if (submitError) {
3758
+ const msg = submitError.message || copy.errors.paymentUnexpected;
3759
+ setError(msg);
3760
+ setIsProcessing(false);
3761
+ onError?.(new Error(msg));
3762
+ return;
3763
+ }
3749
3764
  const { error: confirmError, paymentIntent } = await stripe.confirmPayment({
3750
3765
  elements,
3751
3766
  clientSecret,
@@ -90,7 +90,7 @@ import {
90
90
  usePlanSelector,
91
91
  usePurchaseGate,
92
92
  useTopupForm
93
- } from "../chunk-Q7GPX6X4.js";
93
+ } from "../chunk-5FZBOPIW.js";
94
94
  import "../chunk-OUSEQRCT.js";
95
95
  export {
96
96
  ActivationFlow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/react",
3
- "version": "1.0.8-preview.5",
3
+ "version": "1.0.8-preview.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "react-dom": "^19.2.4",
66
66
  "typescript": "^5.9.3",
67
67
  "vitest": "^4.1.2",
68
- "@solvapay/server": "1.0.8-preview.5",
68
+ "@solvapay/server": "1.0.8-preview.6",
69
69
  "@solvapay/test-utils": "0.0.0"
70
70
  },
71
71
  "scripts": {