@funnelsgrove/payments 0.66.0 → 0.68.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/README.md +27 -5
- package/dist/generated/package-version.d.ts +1 -1
- package/dist/generated/package-version.js +1 -1
- package/dist/providers/solidgate/components/SolidgateCheckoutDialog.js +5 -1
- package/dist/providers/solidgate/services/solidgateDeclineMessage.js +1 -1
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.d.ts +27 -2
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.js +205 -100
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.options.d.ts +16 -0
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.options.js +19 -0
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.styles.d.ts +3 -1
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.styles.js +13 -8
- package/dist/providers/stripe/components/WalletButton.d.ts +20 -0
- package/dist/providers/stripe/components/WalletButton.js +52 -0
- package/dist/providers/stripe/components/index.d.ts +1 -0
- package/dist/providers/stripe/components/index.js +1 -0
- package/dist/providers/stripe/hooks/useStripeOneTimeCheckoutSession.d.ts +10 -3
- package/dist/providers/stripe/hooks/useStripeOneTimeCheckoutSession.js +18 -8
- package/dist/providers/stripe/hooks/useStripeSubscriptionCheckoutSession.d.ts +10 -3
- package/dist/providers/stripe/hooks/useStripeSubscriptionCheckoutSession.js +19 -8
- package/dist/providers/stripe/services/checkout/requests.d.ts +8 -4
- package/dist/providers/stripe/services/checkout/requests.js +6 -6
- package/dist/providers/stripe/services/checkout/types.d.ts +9 -0
- package/dist/providers/stripe/services/checkoutCompletionAnalytics.service.d.ts +1 -1
- package/dist/providers/stripe/services/oneClick/completePayment.js +4 -1
- package/dist/providers/stripe/services/oneClick/confirmation.js +8 -5
- package/dist/providers/stripe/services/oneClick/types.d.ts +2 -0
- package/package.json +5 -5
|
@@ -10,11 +10,14 @@ export const confirmOneClickPayment = async (payment, input) => {
|
|
|
10
10
|
if (!stripe) {
|
|
11
11
|
throw new Error('Stripe could not be initialized for one-click payment confirmation.');
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
// CHECKOUT-BR-011: Stripe.js shows the new Pix QR code and resolves once it is paid or closed.
|
|
14
|
+
const confirmation = payment.paymentMethodType === 'pix'
|
|
15
|
+
? await stripe.confirmPixPayment(clientSecret, { payment_method: {} })
|
|
16
|
+
: await stripe.confirmPayment({
|
|
17
|
+
clientSecret,
|
|
18
|
+
confirmParams: { return_url: input.returnUrl },
|
|
19
|
+
redirect: 'if_required',
|
|
20
|
+
});
|
|
18
21
|
if (confirmation.error) {
|
|
19
22
|
throw new Error(confirmation.error.message || 'Unable to confirm one-click payment.');
|
|
20
23
|
}
|
|
@@ -28,6 +28,8 @@ export type ChargeOneClickPaymentInput = {
|
|
|
28
28
|
export type ChargeOneClickPaymentResponse = {
|
|
29
29
|
paymentIntentId: string;
|
|
30
30
|
status: string;
|
|
31
|
+
/** `pix` when the buyer paid the purchase with Pix and must scan a new QR code. */
|
|
32
|
+
paymentMethodType?: 'card' | 'pix';
|
|
31
33
|
amountCents?: number;
|
|
32
34
|
money?: ProviderMoney;
|
|
33
35
|
clientSecret?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnelsgrove/payments",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/The-Solid-Grove/funnelsgrove.git",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"jsdom": "20.0.3",
|
|
47
47
|
"typescript": "^5",
|
|
48
48
|
"vitest": "^3.2.4",
|
|
49
|
-
"@funnelsgrove/runtime": "0.
|
|
50
|
-
"@funnelsgrove/analytics": "0.
|
|
49
|
+
"@funnelsgrove/runtime": "0.44.0",
|
|
50
|
+
"@funnelsgrove/analytics": "0.27.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@funnelsgrove/runtime": "^0.
|
|
54
|
-
"@funnelsgrove/analytics": "^0.
|
|
53
|
+
"@funnelsgrove/runtime": "^0.44.0",
|
|
54
|
+
"@funnelsgrove/analytics": "^0.27.0"
|
|
55
55
|
}
|
|
56
56
|
}
|