@stripe/stripe-react-native 0.39.0 → 0.40.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/CHANGELOG.md +13 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +13 -0
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +0 -60
- package/ios/CardFieldView.swift +0 -17
- package/ios/StripeSdk+PaymentSheet.swift +9 -0
- package/ios/StripeSdk.swift +29 -66
- package/lib/commonjs/components/CustomerSheet.js +1 -1
- package/lib/commonjs/components/CustomerSheet.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/components/CustomerSheet.js +1 -1
- package/lib/module/components/CustomerSheet.js.map +1 -1
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts +3 -3
- package/lib/typescript/src/types/PaymentSheet.d.ts +21 -0
- package/lib/typescript/src/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/CustomerSheet.tsx +3 -3
- package/src/types/PaymentSheet.ts +24 -0
- package/src/types/index.ts +1 -0
- package/stripe-react-native.podspec +1 -1
|
@@ -257,7 +257,7 @@ export type Props = {
|
|
|
257
257
|
* @returns JSX.Element
|
|
258
258
|
* @category ReactComponents
|
|
259
259
|
*/
|
|
260
|
-
function
|
|
260
|
+
function Component({
|
|
261
261
|
visible,
|
|
262
262
|
presentationStyle,
|
|
263
263
|
animationStyle,
|
|
@@ -319,8 +319,8 @@ function CustomerSheet({
|
|
|
319
319
|
/**
|
|
320
320
|
* The Customer Sheet is a prebuilt UI component that lets your customers manage their saved payment methods.
|
|
321
321
|
*/
|
|
322
|
-
export const
|
|
323
|
-
|
|
322
|
+
export const CustomerSheet = {
|
|
323
|
+
Component,
|
|
324
324
|
initialize,
|
|
325
325
|
present,
|
|
326
326
|
retrievePaymentOptionSelection,
|
|
@@ -65,6 +65,11 @@ type SetupParamsBase = IntentParams & {
|
|
|
65
65
|
* If false, the customer can't delete if they only have one saved payment method remaining.
|
|
66
66
|
*/
|
|
67
67
|
allowsRemovalOfLastSavedPaymentMethod?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Defines the layout orientations available for displaying payment methods in PaymentSheet.
|
|
70
|
+
* - Note: Defaults to `Automatic` if not set
|
|
71
|
+
*/
|
|
72
|
+
paymentMethodLayout?: PaymentMethodLayout;
|
|
68
73
|
};
|
|
69
74
|
|
|
70
75
|
export type SetupParams =
|
|
@@ -417,3 +422,22 @@ export type SetupMode = {
|
|
|
417
422
|
Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage */
|
|
418
423
|
setupFutureUsage: FutureUsage;
|
|
419
424
|
};
|
|
425
|
+
|
|
426
|
+
export enum PaymentMethodLayout {
|
|
427
|
+
/**
|
|
428
|
+
* Payment methods are arranged horizontally.
|
|
429
|
+
* Users can swipe left or right to navigate through different payment methods.
|
|
430
|
+
*/
|
|
431
|
+
Horizontal = 'Horizontal',
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Payment methods are arranged vertically.
|
|
435
|
+
* Users can scroll up or down to navigate through different payment methods.
|
|
436
|
+
*/
|
|
437
|
+
Vertical = 'Vertical',
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* This lets Stripe choose the best layout for payment methods in the sheet.
|
|
441
|
+
*/
|
|
442
|
+
Automatic = 'Automatic',
|
|
443
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
# Keep stripe_version in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/stripe-identity-react-native.podspec
|
|
5
|
-
stripe_version = '~> 23.
|
|
5
|
+
stripe_version = '~> 23.32.0'
|
|
6
6
|
|
|
7
7
|
Pod::Spec.new do |s|
|
|
8
8
|
s.name = 'stripe-react-native'
|