richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
217 stars 77 forks source link

[BUG] Missing type ConfirmCashappSetupOptions in "@stripe/stripe-js@3.0.4" #244

Closed mbagiella closed 5 months ago

mbagiella commented 6 months ago

Describe the bug After updating the @stripe/stripe-js to last version : 3.0.4 and ngx-stripe to last version: 3.0.4 and @types/stripe-v3: 3.1.33 I'm not able to build anymore

To Reproduce Steps to reproduce the behavior: update stripes packages to the last version

Expected behavior build without error

Additional context Error: node_modules/ngx-stripe/lib/services/stripe.service.d.ts:2:2988 - error TS2724: '"@stripe/stripe-js"' has no exported member named 'ConfirmCashappSetupOptions'. Did you mean 'ConfirmCardSetupOptions'?

2 import { ConfirmAcssDebitPaymentData, ConfirmAcssDebitPaymentOptions, ConfirmAfterpayClearpayPaymentData, ConfirmAfterpayClearpayPaymentOptions, ConfirmAlipayPaymentData, ConfirmAlipayPaymentOptions, ConfirmAuBecsDebitPaymentData, ConfirmAuBecsDebitSetupData, ConfirmBancontactPaymentData, ConfirmBancontactPaymentOptions, ConfirmBoletoPaymentData, ConfirmBoletoPaymentOptions, ConfirmCardPaymentData, ConfirmCardPaymentOptions, ConfirmEpsPaymentData, ConfirmEpsPaymentOptions, ConfirmFpxPaymentData, ConfirmFpxPaymentOptions, ConfirmGiropayPaymentData, ConfirmGiropayPaymentOptions, ConfirmGrabPayPaymentData, ConfirmGrabPayPaymentOptions, ConfirmIdealPaymentData, ConfirmIdealPaymentOptions, ConfirmKlarnaPaymentData, ConfirmKlarnaPaymentOptions, ConfirmOxxoPaymentData, ConfirmOxxoPaymentOptions, ConfirmP24PaymentData, ConfirmP24PaymentOptions, ConfirmCardSetupData, ConfirmCardSetupOptions, ConfirmSepaDebitPaymentData, ConfirmSofortPaymentData, ConfirmWechatPayPaymentData, ConfirmWechatPayPaymentOptions, ConfirmSepaDebitSetupData, CreatePaymentMethodData, VerifyMicrodepositsForPaymentData, ConfirmAcssDebitSetupData, ConfirmAcssDebitSetupOptions, CreateSourceData, CreateTokenIbanData, CreateTokenCardData, CreateTokenPiiData, CreateTokenBankAccountData, PaymentRequest, PaymentRequestOptions, RedirectToCheckoutOptions, RetrieveSourceParam, Stripe, StripeCardElement, StripeCardNumberElement, StripeCardCvcElement, StripeConstructorOptions, StripeElements, StripeElementsOptions, StripeElement, StripeError, StripeIbanElement, TokenCreateParams, ConfirmBacsDebitSetupData, ConfirmBancontactSetupData, ConfirmIdealSetupData, ConfirmSofortSetupData, VerifyMicrodepositsForSetupData, VerificationSessionResult, ConfirmPayPalPaymentData, ConfirmPayPalSetupData, ConfirmPaymentData, ConfirmCustomerBalancePaymentData, ConfirmCustomerBalancePaymentOptions, ConfirmPayNowPaymentData, ConfirmPayNowPaymentOptions, ConfirmPromptPayPaymentData, ConfirmPromptPayPaymentOptions, ConfirmAffirmPaymentData, ConfirmAffirmPaymentOptions, ConfirmSofortPaymentOptions, ConfirmSofortSetupOptions, ConfirmKonbiniPaymentData, ConfirmKonbiniPaymentOptions, ConfirmUsBankAccountPaymentData, CollectBankAccountForPaymentOptions, ConfirmUsBankAccountSetupData, CollectBankAccountForSetupOptions, ConfirmPixPaymentData, ConfirmPixPaymentOptions, PaymentIntentResult, PaymentMethodResult, SetupIntentResult, ProcessOrderResult, RetrieveOrderResult, TokenResult, SourceResult, FinancialConnectionsSessionResult, CollectBankAccountTokenResult, EphemeralKeyNonceResult, RadarSessionPayload, ProcessOrderParams, CollectFinancialConnectionsAccountsOptions, CollectBankAccountTokenOptions, EphemeralKeyNonceOptions, StripeElementsOptionsClientSecret, StripeElementsOptionsMode, ConfirmBlikPaymentData, ConfirmBlikPaymentOptions, ConfirmCashappPaymentData, ConfirmCashappPaymentOptions, PaymentIntentOrSetupIntentResult, CreatePaymentMethodFromElements, CreatePaymentMethodFromElement, ConfirmCashappSetupData, ConfirmCashappSetupOptions, StripeCustomCheckoutOptions, StripeCustomCheckout, StripeEmbeddedCheckoutOptions, StripeEmbeddedCheckout } from '@stripe/stripe-js';

richnologies commented 6 months ago

Hey @mbagiella, this is an issue in the peer dependency package @stripe/stripe-js

I'll open an issue in their repo. In the meantime if you downgrade to version 3.0.3 it works fine. I'll keep you posted

richnologies commented 6 months ago

Here is the Issue: https://github.com/stripe/stripe-js/issues/559

thecodemonk commented 6 months ago

@richnologies We're using 16.20.0, is there a way to force it use the stripe js library that is working? We were supposed to publish tonight, but the builds are broken now. Does this library just always use the latest version of stripe.js regardless of version of ngx-stripe? We were surprised a build from earlier today was working and now it's not, even though we haven't changed versions...

richnologies commented 6 months ago

Hey @thecodemonk, sorry about that, just install the specific version of @stripe/stripe-js

For example, in your package.json, instead of having something like:

"@stripe/stripe-js": "^3.0.4",

replace it with the fixed version:

"@stripe/stripe-js": "3.0.3"

This will force npm to install that specific version and it should work fine

Also, doing something like: npm i @stripe/stripe-js@3.0.3 should also work, but if you don't change the package.json file, in the next npm i it might get broken again

richnologies commented 6 months ago

Also, a PR has been created, so hopefully it will be fixed very soon: https://github.com/stripe/stripe-js/pull/561