swell-js 3.18.2 → 3.19.2

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.
@@ -10956,7 +10956,7 @@
10956
10956
  return;
10957
10957
  }
10958
10958
  const { error: setupIntentError } = await stripe.confirmCardSetup(
10959
- authorization.client_secret
10959
+ toSnake(authorization).client_secret
10960
10960
  );
10961
10961
  return setupIntentError ? { error: setupIntentError } : authorization.card;
10962
10962
  }
@@ -11624,17 +11624,22 @@
11624
11624
  }, stripeCustomer ? { customer: stripeCustomer } : {})
11625
11625
  }).catch(onError)
11626
11626
  );
11627
- if (intent && intent.status === "requires_confirmation") {
11628
- const { paymentIntent, error } = await stripe.confirmCardPayment(
11629
- intent.client_secret
11630
- );
11631
- return error ? onError(error) : await methods$8(request, options$1).update({
11627
+ if (intent && ["requires_capture", "requires_confirmation"].includes(intent.status)) {
11628
+ if (intent.status === "requires_confirmation") {
11629
+ const { error } = await stripe.confirmCardPayment(
11630
+ intent.client_secret
11631
+ );
11632
+ if (error) {
11633
+ return onError(error);
11634
+ }
11635
+ }
11636
+ return await methods$8(request, options$1).update({
11632
11637
  billing: {
11633
11638
  method: "card",
11634
11639
  card: paymentMethod,
11635
11640
  intent: {
11636
11641
  stripe: __spreadValues$1({
11637
- id: paymentIntent.id
11642
+ id: intent.id
11638
11643
  }, !!auth_total && {
11639
11644
  auth_amount: auth_total
11640
11645
  })
@@ -12123,7 +12128,7 @@
12123
12128
  previewContent: null
12124
12129
  };
12125
12130
  const api = {
12126
- version: "3.18.2",
12131
+ version: "3.19.2",
12127
12132
  options,
12128
12133
  request,
12129
12134
  init(store, key, opt = {}) {