@stripe/stripe-react-native 0.63.0 → 0.64.1
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 +2 -2
- package/android/build.gradle +2 -2
- package/android/detekt/detekt-baseline.xml +81 -0
- package/android/detekt/detekt.gradle +45 -0
- package/android/detekt/detekt.yml +722 -0
- package/android/gradle.properties +4 -4
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +5 -1
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementView.kt +26 -0
- package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementViewManager.kt +42 -0
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +105 -49
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +72 -12
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetManager.kt +8 -4
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +26 -11
- package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/NavigationBarView.kt +14 -5
- package/android/src/main/java/com/reactnativestripesdk/PaymentElementConfig.kt +6 -2
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherManager.kt +2 -2
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +24 -1
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodMessagingElementConfig.kt +7 -4
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodMessagingElementViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +8 -4
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +9 -3
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +110 -29
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +256 -12
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +6 -5
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +6 -2
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerSessionProvider.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutAddressUpdate.kt +45 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutMappers.kt +101 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +4 -2
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +5 -1
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +31 -17
- package/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt +2 -1
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +6 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +2 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeCurrencySelectorElementManagerDelegate.java +35 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeCurrencySelectorElementManagerInterface.java +18 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +44 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +43 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +5 -1
- package/android/src/test/java/com/reactnativestripesdk/PaymentMethodMessagingElementConfigTest.kt +3 -3
- package/android/src/test/java/com/reactnativestripesdk/mappers/MappersTest.kt +93 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +336 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/PaymentOptionDisplayDataMapperTest.kt +9 -4
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutMappersTest.kt +89 -0
- package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutTestFixtures.java +49 -0
- package/ios/AddressSheet/AddressSheetUtils.swift +23 -0
- package/ios/AddressSheet/AddressSheetView.swift +9 -14
- package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewController.swift +6 -8
- package/ios/CurrencySelectorElementManager.m +9 -0
- package/ios/CurrencySelectorElementManager.swift +12 -0
- package/ios/CurrencySelectorElementView.swift +24 -0
- package/ios/Mappers+Checkout.swift +193 -0
- package/ios/Mappers.swift +74 -5
- package/ios/NewArch/EmbeddedPaymentElementViewComponentView.mm +16 -2
- package/ios/NewArch/StripeCurrencySelectorElementComponentView.h +10 -0
- package/ios/NewArch/StripeCurrencySelectorElementComponentView.mm +75 -0
- package/ios/PaymentMethodFactory.swift +19 -0
- package/ios/PaymentMethodMessagingElementConfig.swift +6 -3
- package/ios/PaymentMethodMessagingElementView.swift +19 -0
- package/ios/StripeSdk-Bridging-Header.h +1 -0
- package/ios/StripeSdk.mm +124 -1
- package/ios/StripeSdkImpl+Checkout.swift +308 -0
- package/ios/StripeSdkImpl+Embedded.swift +108 -27
- package/ios/StripeSdkImpl+PaymentSheet.swift +18 -2
- package/ios/StripeSdkImpl.swift +41 -103
- package/ios/StripeSwiftInterop.h +1 -0
- package/jest/mock.js +16 -1
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/CurrencySelectorElement.js +2 -0
- package/lib/commonjs/components/CurrencySelectorElement.js.map +1 -0
- package/lib/commonjs/components/PaymentMethodMessagingElement.js +2 -0
- package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -0
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/connect/Components.js +1 -1
- package/lib/commonjs/connect/Components.js.map +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
- package/lib/commonjs/connect/NavigationBar.js +1 -1
- package/lib/commonjs/connect/NavigationBar.js.map +1 -1
- package/lib/commonjs/connect/testUtils.js +1 -1
- package/lib/commonjs/connect/testUtils.js.map +1 -1
- package/lib/commonjs/events.js +1 -1
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/hooks/useCheckout.js +2 -0
- package/lib/commonjs/hooks/useCheckout.js.map +1 -0
- package/lib/commonjs/hooks/useOnramp.js +1 -1
- package/lib/commonjs/hooks/useOnramp.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js.map +1 -1
- package/lib/commonjs/specs/NativeCardForm.js +1 -1
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/commonjs/specs/NativeCurrencySelectorElement.js +2 -0
- package/lib/commonjs/specs/NativeCurrencySelectorElement.js.map +1 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
- package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
- package/lib/commonjs/specs/NativeOnrampSdkModule.js +1 -1
- package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -1
- package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js.map +1 -1
- package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/commonjs/types/Checkout.js +2 -0
- package/lib/commonjs/types/Checkout.js.map +1 -0
- package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/types/Onramp.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/CurrencySelectorElement.js +2 -0
- package/lib/module/components/CurrencySelectorElement.js.map +1 -0
- package/lib/module/components/PaymentMethodMessagingElement.js +2 -0
- package/lib/module/components/PaymentMethodMessagingElement.js.map +1 -0
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/components/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/connect/Components.js +1 -1
- package/lib/module/connect/Components.js.map +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/module/connect/EmbeddedComponent.js +1 -1
- package/lib/module/connect/EmbeddedComponent.js.map +1 -1
- package/lib/module/connect/ModalCloseButton.js +1 -1
- package/lib/module/connect/ModalCloseButton.js.map +1 -1
- package/lib/module/connect/NavigationBar.js +1 -1
- package/lib/module/connect/NavigationBar.js.map +1 -1
- package/lib/module/connect/testUtils.js +1 -1
- package/lib/module/connect/testUtils.js.map +1 -1
- package/lib/module/events.js +1 -1
- package/lib/module/events.js.map +1 -1
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/hooks/useCheckout.js +2 -0
- package/lib/module/hooks/useCheckout.js.map +1 -0
- package/lib/module/hooks/useOnramp.js +1 -1
- package/lib/module/hooks/useOnramp.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +1 -1
- package/lib/module/specs/NativeAddressSheet.js +1 -1
- package/lib/module/specs/NativeApplePayButton.js +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/module/specs/NativeCardField.js +1 -1
- package/lib/module/specs/NativeCardField.js.map +1 -1
- package/lib/module/specs/NativeCardForm.js +1 -1
- package/lib/module/specs/NativeCardForm.js.map +1 -1
- package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/module/specs/NativeCurrencySelectorElement.js +2 -0
- package/lib/module/specs/NativeCurrencySelectorElement.js.map +1 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/module/specs/NativeGooglePayButton.js +1 -1
- package/lib/module/specs/NativeNavigationBar.js +1 -1
- package/lib/module/specs/NativeOnrampSdkModule.js +1 -1
- package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -1
- package/lib/module/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/module/specs/NativePaymentMethodMessagingElement.js.map +1 -1
- package/lib/module/specs/NativeStripeContainer.js +1 -1
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/module/types/Checkout.js +2 -0
- package/lib/module/types/Checkout.js.map +1 -0
- package/lib/module/types/EmbeddedPaymentElement.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/module/types/Onramp.js.map +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/typescript/src/components/CurrencySelectorElement.d.ts +62 -0
- package/lib/typescript/src/components/CurrencySelectorElement.d.ts.map +1 -0
- package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts +41 -0
- package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts.map +1 -0
- package/lib/typescript/src/connect/testUtils.d.ts +4 -0
- package/lib/typescript/src/connect/testUtils.d.ts.map +1 -1
- package/lib/typescript/src/events.d.ts +11 -0
- package/lib/typescript/src/events.d.ts.map +1 -1
- package/lib/typescript/src/functions.d.ts +2 -0
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useCheckout.d.ts +21 -0
- package/lib/typescript/src/hooks/useCheckout.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useOnramp.d.ts +9 -3
- package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeCurrencySelectorElement.d.ts +25 -0
- package/lib/typescript/src/specs/NativeCurrencySelectorElement.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +5 -1
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +1 -1
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePaymentMethodMessagingElement.d.ts +1 -6
- package/lib/typescript/src/specs/NativePaymentMethodMessagingElement.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +19 -2
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/types/Checkout.d.ts +336 -0
- package/lib/typescript/src/types/Checkout.d.ts.map +1 -0
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +36 -1
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -1
- package/lib/typescript/src/types/NextAction.d.ts +8 -1
- package/lib/typescript/src/types/NextAction.d.ts.map +1 -1
- package/lib/typescript/src/types/Onramp.d.ts +40 -1
- package/lib/typescript/src/types/Onramp.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentIntent.d.ts +11 -1
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentMethod.d.ts +10 -6
- package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentSheet.d.ts +22 -6
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/components/PaymentMethodMessagingElementComponent.d.ts +16 -1
- package/lib/typescript/src/types/components/PaymentMethodMessagingElementComponent.d.ts.map +1 -1
- package/package.json +21 -7
- package/src/components/CurrencySelectorElement.tsx +95 -0
- package/src/components/PaymentMethodMessagingElement.tsx +109 -0
- package/src/components/StripeProvider.tsx +1 -1
- package/src/connect/testUtils.ts +2 -0
- package/src/events.ts +20 -3
- package/src/functions.ts +31 -2
- package/src/hooks/useCheckout.tsx +207 -0
- package/src/hooks/useOnramp.tsx +45 -24
- package/src/index.tsx +4 -0
- package/src/specs/NativeCurrencySelectorElement.ts +35 -0
- package/src/specs/NativeEmbeddedPaymentElement.ts +12 -2
- package/src/specs/NativeOnrampSdkModule.ts +1 -1
- package/src/specs/NativePaymentMethodMessagingElement.ts +0 -7
- package/src/specs/NativeStripeSdkModule.ts +61 -2
- package/src/types/Checkout.ts +377 -0
- package/src/types/EmbeddedPaymentElement.tsx +117 -26
- package/src/types/NextAction.ts +9 -0
- package/src/types/Onramp.ts +45 -1
- package/src/types/PaymentIntent.ts +10 -0
- package/src/types/PaymentMethod.ts +9 -6
- package/src/types/PaymentSheet.ts +29 -6
- package/src/types/components/PaymentMethodMessagingElementComponent.tsx +17 -1
- package/stripe-react-native.podspec +8 -8
- package/android/spotless.gradle +0 -19
- package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +0 -155
package/README.md
CHANGED
|
@@ -75,8 +75,8 @@ to your `app.json` file, where `merchantIdentifier` is the Apple merchant ID obt
|
|
|
75
75
|
|
|
76
76
|
#### Android
|
|
77
77
|
|
|
78
|
-
- Android
|
|
79
|
-
- Your `compileSdkVersion` must be `
|
|
78
|
+
- Android 6.0 (API level 23) and above
|
|
79
|
+
- Your `compileSdkVersion` must be `36` or higher.
|
|
80
80
|
- Android gradle plugin 4.x and above
|
|
81
81
|
- Kotlin 2.x and above. See [this issue](https://github.com/stripe/stripe-react-native/issues/1924#issuecomment-2867227374) for how to update the Kotlin version when using react-native 0.77 and below or Expo SDK 52.
|
|
82
82
|
|
package/android/build.gradle
CHANGED
|
@@ -15,7 +15,7 @@ buildscript {
|
|
|
15
15
|
classpath "com.android.tools.build:gradle:7.2.2"
|
|
16
16
|
// noinspection DifferentKotlinGradleVersion
|
|
17
17
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
18
|
-
classpath "
|
|
18
|
+
classpath "dev.detekt:detekt-gradle-plugin:2.0.0-alpha.2"
|
|
19
19
|
// only use this old compose-compiler plugin when Kotlin >= 2.0
|
|
20
20
|
if (kotlinMajor >= 2) {
|
|
21
21
|
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion"
|
|
@@ -24,7 +24,7 @@ buildscript {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (project == rootProject) {
|
|
27
|
-
apply from: "
|
|
27
|
+
apply from: "detekt/detekt.gradle"
|
|
28
28
|
return
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
|
2
|
+
<SmellBaseline>
|
|
3
|
+
<ManuallySuppressedIssues/>
|
|
4
|
+
<CurrentIssues>
|
|
5
|
+
<ID>CyclomaticComplexMethod:CardFieldView.kt:CardFieldView$fun setCardStyle</ID>
|
|
6
|
+
<ID>CyclomaticComplexMethod:CardFormView.kt:CardFormView$@SuppressLint("RestrictedApi", "VisibleForTests") fun setCardStyle</ID>
|
|
7
|
+
<ID>CyclomaticComplexMethod:EmbeddedPaymentElementView.kt:EmbeddedPaymentElementView$@SuppressLint("RestrictedApi") @Composable override fun Content</ID>
|
|
8
|
+
<ID>CyclomaticComplexMethod:Mappers.kt:@SuppressLint("RestrictedApi") internal fun mapNextAction: WritableMap?</ID>
|
|
9
|
+
<ID>CyclomaticComplexMethod:Mappers.kt:fun mapToUICustomization: PaymentAuthConfig.Stripe3ds2UiCustomization</ID>
|
|
10
|
+
<ID>CyclomaticComplexMethod:Mappers.kt:internal fun mapPaymentMethodType: String</ID>
|
|
11
|
+
<ID>CyclomaticComplexMethod:Mappers.kt:internal fun mapToPaymentMethodType: PaymentMethod.Type?</ID>
|
|
12
|
+
<ID>CyclomaticComplexMethod:PaymentMethodCreateParamsFactory.kt:PaymentMethodCreateParamsFactory$@Throws(PaymentMethodCreateParamsException::class) fun createPaymentMethodParams: PaymentMethodCreateParams</ID>
|
|
13
|
+
<ID>CyclomaticComplexMethod:PaymentSheetAppearance.kt:@SuppressLint("RestrictedApi") @Throws(PaymentSheetAppearanceException::class) private fun buildEmbeddedAppearance: PaymentSheet.Appearance.Embedded</ID>
|
|
14
|
+
<ID>EmptyFunctionBlock:CardFieldView.kt:CardFieldView.<no name provided>${ }</ID>
|
|
15
|
+
<ID>EmptyFunctionBlock:CardFieldView.kt:CardFieldView.<no name provided>${}</ID>
|
|
16
|
+
<ID>EmptyFunctionBlock:CustomerSheetManager.kt:CustomerSheetManager.<no name provided>${ }</ID>
|
|
17
|
+
<ID>EmptyFunctionBlock:CustomerSheetManager.kt:CustomerSheetManager.<no name provided>${}</ID>
|
|
18
|
+
<ID>EmptyFunctionBlock:DrawableLoadingTest.kt:DrawableLoadingTest.MockAsyncDrawable${}</ID>
|
|
19
|
+
<ID>EmptyFunctionBlock:PaymentSheetManager.kt:<no name provided>${}</ID>
|
|
20
|
+
<ID>EmptyFunctionBlock:PaymentSheetManager.kt:PaymentSheetManager.<no name provided>${ }</ID>
|
|
21
|
+
<ID>EmptyFunctionBlock:PaymentSheetManager.kt:PaymentSheetManager.<no name provided>${}</ID>
|
|
22
|
+
<ID>EmptyFunctionBlock:StripeAbstractComposeView.kt:StripeAbstractComposeView.CompatView${ }</ID>
|
|
23
|
+
<ID>EmptyFunctionBlock:StripeSdkModule.kt:StripeSdkModule.<no name provided>${}</ID>
|
|
24
|
+
<ID>ForbiddenComment:Mappers.kt:// TODO: Can't access, private</ID>
|
|
25
|
+
<ID>ForbiddenComment:PaymentSheetAppearance.kt:// TODO: The theme is so crazy long, why does each Color thing has the same redundant Theme...</ID>
|
|
26
|
+
<ID>ForbiddenComment:PaymentSheetAppearance.kt:// TODO: Why is background a string but successBackgroundColor a "dynamic" color?</ID>
|
|
27
|
+
<ID>ForbiddenComment:StripeSdkModule.kt:StripeSdkModule$// TODO:</ID>
|
|
28
|
+
<ID>ForbiddenComment:StripeSdkModule.kt:StripeSdkModule$// TODO: Uncomment when WeChat is re-enabled in stripe-ios</ID>
|
|
29
|
+
<ID>LargeClass:PaymentElementConfigTest.kt:PaymentElementConfigTest</ID>
|
|
30
|
+
<ID>LargeClass:PaymentSheetAppearanceTest.kt:PaymentSheetAppearanceTest</ID>
|
|
31
|
+
<ID>LargeClass:StripeSdkModule.kt:StripeSdkModule : NativeStripeSdkModuleSpec</ID>
|
|
32
|
+
<ID>LongMethod:CardFieldView.kt:CardFieldView$fun setCardStyle</ID>
|
|
33
|
+
<ID>LongMethod:CardFieldView.kt:CardFieldView$private fun setListeners</ID>
|
|
34
|
+
<ID>LongMethod:CardFormView.kt:CardFormView$@SuppressLint("RestrictedApi", "VisibleForTests") fun setCardStyle</ID>
|
|
35
|
+
<ID>LongMethod:CardFormView.kt:CardFormView$private fun setListeners</ID>
|
|
36
|
+
<ID>LongMethod:CustomerSheetManager.kt:CustomerSheetManager$override fun onCreate</ID>
|
|
37
|
+
<ID>LongMethod:EmbeddedPaymentElementView.kt:EmbeddedPaymentElementView$@SuppressLint("RestrictedApi") @Composable override fun Content</ID>
|
|
38
|
+
<ID>LongMethod:EmbeddedPaymentElementViewManager.kt:EmbeddedPaymentElementViewManager$@SuppressLint("RestrictedApi") @OptIn( ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi::class, CardFundingFilteringPrivatePreview::class, ) private fun parseElementConfiguration: EmbeddedPaymentElement.Configuration</ID>
|
|
39
|
+
<ID>LongMethod:Mappers.kt:@SuppressLint("RestrictedApi") internal fun mapNextAction: WritableMap?</ID>
|
|
40
|
+
<ID>LongMethod:Mappers.kt:fun mapToUICustomization: PaymentAuthConfig.Stripe3ds2UiCustomization</ID>
|
|
41
|
+
<ID>LongMethod:Mappers.kt:internal fun mapFromPaymentMethod: WritableMap</ID>
|
|
42
|
+
<ID>LongMethod:PaymentOptionDisplayDataMapper.kt:fun AnnotatedString.toHtmlString: String</ID>
|
|
43
|
+
<ID>LongMethod:PaymentSheetAppearance.kt:@SuppressLint("RestrictedApi") @Throws(PaymentSheetAppearanceException::class) private fun buildEmbeddedAppearance: PaymentSheet.Appearance.Embedded</ID>
|
|
44
|
+
<ID>LongMethod:PaymentSheetAppearanceTest.kt:PaymentSheetAppearanceTest$@Test fun testFullAppearanceConfiguration</ID>
|
|
45
|
+
<ID>LongMethod:PaymentSheetAppearanceTest.kt:PaymentSheetAppearanceTest$@Test fun testFullEmbeddedAppearance_FlatWithRadio</ID>
|
|
46
|
+
<ID>LongMethod:PaymentSheetAppearanceTest.kt:PaymentSheetAppearanceTest$@Test fun testPartialAppearanceConfiguration</ID>
|
|
47
|
+
<ID>LongMethod:PaymentSheetManager.kt:PaymentSheetManager$fun configure</ID>
|
|
48
|
+
<ID>LongMethod:StripeSdkModule.kt:StripeSdkModule$@ReactMethod override fun confirmPlatformPay</ID>
|
|
49
|
+
<ID>RethrowCaughtException:PaymentMethodCreateParamsFactory.kt:PaymentMethodCreateParamsFactory$throw error</ID>
|
|
50
|
+
<ID>SwallowedException:StripeSdkModule.kt:StripeSdkModule$e: Exception</ID>
|
|
51
|
+
<ID>ThrowsCount:PaymentSheetAppearance.kt:@Throws(PaymentSheetAppearanceException::class) internal fun getFontResId: Int?</ID>
|
|
52
|
+
<ID>TooGenericExceptionCaught:CardFieldView.kt:CardFieldView$e: Exception</ID>
|
|
53
|
+
<ID>TooGenericExceptionCaught:CustomerSheetManager.kt:CustomerSheetManager$e: Exception</ID>
|
|
54
|
+
<ID>TooGenericExceptionCaught:EmbeddedPaymentElementView.kt:EmbeddedPaymentElementView$e: Exception</ID>
|
|
55
|
+
<ID>TooGenericExceptionCaught:EmbeddedPaymentElementViewManager.kt:EmbeddedPaymentElementViewManager$e: Exception</ID>
|
|
56
|
+
<ID>TooGenericExceptionCaught:PaymentSheetManager.kt:PaymentSheetManager$e: Exception</ID>
|
|
57
|
+
<ID>TooGenericExceptionCaught:PaymentSheetManager.kt:e: Exception</ID>
|
|
58
|
+
<ID>TooGenericExceptionCaught:PushProvisioningProxy.kt:PushProvisioningProxy$e: Exception</ID>
|
|
59
|
+
<ID>TooGenericExceptionCaught:StripeConnectDeepLinkInterceptorActivity.kt:StripeConnectDeepLinkInterceptorActivity$e: Exception</ID>
|
|
60
|
+
<ID>TooGenericExceptionCaught:StripeSdkModule.kt:StripeSdkModule$e: Exception</ID>
|
|
61
|
+
<ID>TooGenericExceptionCaught:TapAndPayProxy.kt:TapAndPayProxy$e: Exception</ID>
|
|
62
|
+
<ID>TooGenericExceptionThrown:EmbeddedPaymentElementViewManager.kt:EmbeddedPaymentElementViewManager$throw Error()</ID>
|
|
63
|
+
<ID>TooGenericExceptionThrown:PaymentLauncherManager.kt:PaymentLauncherManager$throw Exception( "Invalid parameters provided to PaymentLauncher. Ensure that you are providing the correct client " + "secret and setup params (if necessary).", )</ID>
|
|
64
|
+
<ID>TooGenericExceptionThrown:PaymentLauncherManager.kt:PaymentLauncherManager$throw Exception("Failed to create Payment Launcher. No client secret provided.")</ID>
|
|
65
|
+
<ID>TooGenericExceptionThrown:PaymentMethodCreateParamsFactory.kt:PaymentMethodCreateParamsFactory$throw Exception("This paymentMethodType is not supported yet")</ID>
|
|
66
|
+
<ID>TooManyFunctions:AddToWalletButtonManager.kt:AddToWalletButtonManager : SimpleViewManagerAddToWalletButtonManagerInterface</ID>
|
|
67
|
+
<ID>TooManyFunctions:AddressSheetViewManager.kt:AddressSheetViewManager : SimpleViewManagerAddressSheetViewManagerInterface</ID>
|
|
68
|
+
<ID>TooManyFunctions:CardFieldView.kt:CardFieldView : FrameLayout</ID>
|
|
69
|
+
<ID>TooManyFunctions:CardFieldViewManager.kt:CardFieldViewManager : SimpleViewManagerCardFieldManagerInterface</ID>
|
|
70
|
+
<ID>TooManyFunctions:CardFormViewManager.kt:CardFormViewManager : SimpleViewManagerCardFormManagerInterface</ID>
|
|
71
|
+
<ID>TooManyFunctions:EventEmitterCompat.kt:EventEmitterCompat</ID>
|
|
72
|
+
<ID>TooManyFunctions:Extensions.kt:com.reactnativestripesdk.utils.Extensions.kt</ID>
|
|
73
|
+
<ID>TooManyFunctions:Mappers.kt:com.reactnativestripesdk.utils.Mappers.kt</ID>
|
|
74
|
+
<ID>TooManyFunctions:PaymentElementConfig.kt:com.reactnativestripesdk.PaymentElementConfig.kt</ID>
|
|
75
|
+
<ID>TooManyFunctions:StripeSdkModule.kt:StripeSdkModule : NativeStripeSdkModuleSpec</ID>
|
|
76
|
+
<ID>UtilityClassWithPublicConstructor:GooglePayRequestHelper.kt:GooglePayRequestHelper</ID>
|
|
77
|
+
<ID>UtilityClassWithPublicConstructor:PaymentSheetAppearance.kt:PaymentSheetAppearanceKeys</ID>
|
|
78
|
+
<ID>UtilityClassWithPublicConstructor:PostalCodeUtilities.kt:PostalCodeUtilities</ID>
|
|
79
|
+
<ID>UtilityClassWithPublicConstructor:ShadowArguments.kt:ShadowArguments</ID>
|
|
80
|
+
</CurrentIssues>
|
|
81
|
+
</SmellBaseline>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
apply plugin: 'dev.detekt'
|
|
2
|
+
|
|
3
|
+
repositories {
|
|
4
|
+
google()
|
|
5
|
+
mavenCentral()
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
def isDetektFormat = gradle.startParameter.taskNames.any { it.contains('detektFormat') }
|
|
9
|
+
|
|
10
|
+
detekt {
|
|
11
|
+
buildUponDefaultConfig = true
|
|
12
|
+
config.setFrom(file("detekt/detekt.yml"))
|
|
13
|
+
baseline = file("detekt/detekt-baseline.xml") // https://detekt.dev/docs/introduction/baseline/
|
|
14
|
+
ignoredBuildTypes = ["debug"]
|
|
15
|
+
ignoredFlavors = []
|
|
16
|
+
ignoredVariants = []
|
|
17
|
+
parallel = true
|
|
18
|
+
autoCorrect = isDetektFormat
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
tasks.register('detektFormat') {
|
|
22
|
+
group = 'formatting'
|
|
23
|
+
description = 'Run detekt with auto-correction enabled.'
|
|
24
|
+
dependsOn 'detekt'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def detektIgnoreFile = file('detekt/.detektignore')
|
|
28
|
+
if (detektIgnoreFile.exists()) {
|
|
29
|
+
def detektIgnorePatterns = []
|
|
30
|
+
detektIgnoreFile.eachLine { line ->
|
|
31
|
+
line = line.trim()
|
|
32
|
+
if (!line.isEmpty() && !line.startsWith('#')) {
|
|
33
|
+
detektIgnorePatterns.add(line)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
afterEvaluate {
|
|
37
|
+
tasks.matching { it.name.startsWith('detekt') && it instanceof org.gradle.api.tasks.SourceTask }.configureEach {
|
|
38
|
+
detektIgnorePatterns.each { pattern -> exclude(pattern) }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
dependencies {
|
|
44
|
+
detektPlugins "dev.detekt:detekt-rules-ktlint-wrapper:2.0.0-alpha.2"
|
|
45
|
+
}
|