@solvapay/react 1.0.8-preview.10 → 1.0.8-preview.11

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.
@@ -1969,6 +1969,13 @@ async function confirmPayment(input) {
1969
1969
  if (!paymentElement) {
1970
1970
  return { status: "error", message: copy.errors.cardElementMissing };
1971
1971
  }
1972
+ const { error: submitError } = await elements.submit();
1973
+ if (submitError) {
1974
+ return {
1975
+ status: "error",
1976
+ message: submitError.message || copy.errors.paymentUnexpected
1977
+ };
1978
+ }
1972
1979
  const { error: error2, paymentIntent: paymentIntent2 } = await stripe.confirmPayment({
1973
1980
  elements,
1974
1981
  clientSecret,
@@ -3214,6 +3221,14 @@ var Inner = ({
3214
3221
  }
3215
3222
  setError(null);
3216
3223
  setIsProcessing(true);
3224
+ const { error: submitError } = await elements.submit();
3225
+ if (submitError) {
3226
+ const msg = submitError.message || copy.errors.paymentUnexpected;
3227
+ setError(msg);
3228
+ setIsProcessing(false);
3229
+ onError?.(new Error(msg));
3230
+ return;
3231
+ }
3217
3232
  const { error: confirmError, paymentIntent } = await stripe.confirmPayment({
3218
3233
  elements,
3219
3234
  clientSecret,
package/dist/index.cjs CHANGED
@@ -2080,6 +2080,13 @@ async function confirmPayment(input) {
2080
2080
  if (!paymentElement) {
2081
2081
  return { status: "error", message: copy.errors.cardElementMissing };
2082
2082
  }
2083
+ const { error: submitError } = await elements.submit();
2084
+ if (submitError) {
2085
+ return {
2086
+ status: "error",
2087
+ message: submitError.message || copy.errors.paymentUnexpected
2088
+ };
2089
+ }
2083
2090
  const { error: error2, paymentIntent: paymentIntent2 } = await stripe.confirmPayment({
2084
2091
  elements,
2085
2092
  clientSecret,
@@ -3314,6 +3321,14 @@ var Inner = ({
3314
3321
  }
3315
3322
  setError(null);
3316
3323
  setIsProcessing(true);
3324
+ const { error: submitError } = await elements.submit();
3325
+ if (submitError) {
3326
+ const msg = submitError.message || copy.errors.paymentUnexpected;
3327
+ setError(msg);
3328
+ setIsProcessing(false);
3329
+ onError?.(new Error(msg));
3330
+ return;
3331
+ }
3317
3332
  const { error: confirmError, paymentIntent } = await stripe.confirmPayment({
3318
3333
  elements,
3319
3334
  clientSecret,
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import {
64
64
  useSolvaPay,
65
65
  useTopup,
66
66
  useTopupAmountSelector
67
- } from "./chunk-MOP3ZBGC.js";
67
+ } from "./chunk-IUTMA66E.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-MOP3ZBGC.js";
93
+ } from "../chunk-IUTMA66E.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.10",
3
+ "version": "1.0.8-preview.11",
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.10",
68
+ "@solvapay/server": "1.0.8-preview.11",
69
69
  "@solvapay/test-utils": "0.0.0"
70
70
  },
71
71
  "scripts": {