@stripe/stripe-react-native 0.41.0 → 0.42.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/README.md +3 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.project +11 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +3 -3
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +21 -0
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +20 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +114 -35
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +50 -0
- package/ios/FinancialConnections.swift +14 -2
- package/ios/Mappers.swift +23 -0
- package/ios/PaymentMethodFactory.swift +31 -29
- package/ios/StripeSdk.swift +50 -19
- package/lib/commonjs/NativeStripeSdk.js.map +1 -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/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/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/types/FinancialConnections.js +1 -1
- package/lib/commonjs/types/FinancialConnections.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentMethod.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/module/NativeStripeSdk.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/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/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/types/FinancialConnections.js +1 -1
- package/lib/module/types/FinancialConnections.js.map +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentMethod.js.map +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +1 -1
- package/lib/typescript/src/functions.d.ts +6 -2
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +4 -2
- package/lib/typescript/src/hooks/useStripe.d.ts +2 -2
- package/lib/typescript/src/types/FinancialConnections.d.ts +64 -0
- package/lib/typescript/src/types/PaymentIntent.d.ts +26 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +7 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +1 -1
- package/package.json +3 -4
- package/src/NativeStripeSdk.tsx +1 -1
- package/src/functions.ts +57 -2
- package/src/hooks/useFinancialConnectionsSheet.tsx +12 -4
- package/src/hooks/useStripe.tsx +10 -4
- package/src/types/FinancialConnections.ts +69 -0
- package/src/types/PaymentIntent.ts +30 -1
- package/src/types/PaymentMethod.ts +8 -0
- package/src/types/PaymentSheet.ts +1 -1
- package/stripe-react-native.podspec +1 -1
|
@@ -88,6 +88,10 @@ export type MandateData = {
|
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
type MetaData = {
|
|
92
|
+
[key: string]: string;
|
|
93
|
+
};
|
|
94
|
+
|
|
91
95
|
export type CardParams =
|
|
92
96
|
| {
|
|
93
97
|
paymentMethodType: 'Card';
|
|
@@ -95,6 +99,7 @@ export type CardParams =
|
|
|
95
99
|
token?: string;
|
|
96
100
|
billingDetails?: BillingDetails;
|
|
97
101
|
mandateData?: MandateData;
|
|
102
|
+
metadata?: MetaData;
|
|
98
103
|
};
|
|
99
104
|
}
|
|
100
105
|
| {
|
|
@@ -104,6 +109,7 @@ export type CardParams =
|
|
|
104
109
|
cvc?: string;
|
|
105
110
|
billingDetails?: BillingDetails;
|
|
106
111
|
mandateData?: MandateData;
|
|
112
|
+
metadata?: MetaData;
|
|
107
113
|
};
|
|
108
114
|
};
|
|
109
115
|
|
|
@@ -113,18 +119,24 @@ export interface IdealParams {
|
|
|
113
119
|
bankName?: string;
|
|
114
120
|
billingDetails?: BillingDetails;
|
|
115
121
|
mandateData?: MandateData;
|
|
122
|
+
metadata?: MetaData;
|
|
116
123
|
};
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
export interface FPXParams {
|
|
120
127
|
paymentMethodType: 'Fpx';
|
|
121
|
-
paymentMethodData?: {
|
|
128
|
+
paymentMethodData?: {
|
|
129
|
+
testOfflineBank?: boolean;
|
|
130
|
+
mandateData?: MandateData;
|
|
131
|
+
metadata?: MetaData;
|
|
132
|
+
};
|
|
122
133
|
}
|
|
123
134
|
|
|
124
135
|
export interface AlipayParams {
|
|
125
136
|
paymentMethodType: 'Alipay';
|
|
126
137
|
paymentMethodData?: {
|
|
127
138
|
mandateData?: MandateData;
|
|
139
|
+
metadata?: MetaData;
|
|
128
140
|
};
|
|
129
141
|
}
|
|
130
142
|
|
|
@@ -133,6 +145,7 @@ export interface OxxoParams {
|
|
|
133
145
|
paymentMethodData: {
|
|
134
146
|
billingDetails: BillingDetails;
|
|
135
147
|
mandateData?: MandateData;
|
|
148
|
+
metadata?: MetaData;
|
|
136
149
|
};
|
|
137
150
|
}
|
|
138
151
|
|
|
@@ -142,6 +155,7 @@ export interface SofortParams {
|
|
|
142
155
|
country: string;
|
|
143
156
|
billingDetails: BillingDetails;
|
|
144
157
|
mandateData?: MandateData;
|
|
158
|
+
metadata?: MetaData;
|
|
145
159
|
};
|
|
146
160
|
}
|
|
147
161
|
export interface GrabPayParams {
|
|
@@ -149,6 +163,7 @@ export interface GrabPayParams {
|
|
|
149
163
|
paymentMethodData?: {
|
|
150
164
|
billingDetails?: BillingDetails;
|
|
151
165
|
mandateData?: MandateData;
|
|
166
|
+
metadata?: MetaData;
|
|
152
167
|
};
|
|
153
168
|
}
|
|
154
169
|
|
|
@@ -157,6 +172,7 @@ export interface BancontactParams {
|
|
|
157
172
|
paymentMethodData: {
|
|
158
173
|
billingDetails: BillingDetails;
|
|
159
174
|
mandateData?: MandateData;
|
|
175
|
+
metadata?: MetaData;
|
|
160
176
|
};
|
|
161
177
|
}
|
|
162
178
|
|
|
@@ -166,6 +182,7 @@ export interface SepaParams {
|
|
|
166
182
|
iban: string;
|
|
167
183
|
billingDetails: BillingDetails;
|
|
168
184
|
mandateData?: MandateData;
|
|
185
|
+
metadata?: MetaData;
|
|
169
186
|
};
|
|
170
187
|
}
|
|
171
188
|
|
|
@@ -174,6 +191,7 @@ export interface GiropayParams {
|
|
|
174
191
|
paymentMethodData: {
|
|
175
192
|
billingDetails: BillingDetails;
|
|
176
193
|
mandateData?: MandateData;
|
|
194
|
+
metadata?: MetaData;
|
|
177
195
|
};
|
|
178
196
|
}
|
|
179
197
|
|
|
@@ -183,6 +201,7 @@ export interface AfterpayClearpayParams {
|
|
|
183
201
|
shippingDetails: BillingDetails;
|
|
184
202
|
billingDetails: BillingDetails;
|
|
185
203
|
mandateData?: MandateData;
|
|
204
|
+
metadata?: MetaData;
|
|
186
205
|
};
|
|
187
206
|
}
|
|
188
207
|
|
|
@@ -194,6 +213,7 @@ export type KlarnaParams = {
|
|
|
194
213
|
} & BillingDetails;
|
|
195
214
|
shippingDetails?: BillingDetails;
|
|
196
215
|
mandateData?: MandateData;
|
|
216
|
+
metadata?: MetaData;
|
|
197
217
|
};
|
|
198
218
|
};
|
|
199
219
|
|
|
@@ -202,6 +222,7 @@ export interface EpsParams {
|
|
|
202
222
|
paymentMethodData: {
|
|
203
223
|
billingDetails: BillingDetails;
|
|
204
224
|
mandateData?: MandateData;
|
|
225
|
+
metadata?: MetaData;
|
|
205
226
|
};
|
|
206
227
|
}
|
|
207
228
|
|
|
@@ -210,6 +231,7 @@ export interface P24Params {
|
|
|
210
231
|
paymentMethodData: {
|
|
211
232
|
billingDetails: BillingDetails;
|
|
212
233
|
mandateData?: MandateData;
|
|
234
|
+
metadata?: MetaData;
|
|
213
235
|
};
|
|
214
236
|
}
|
|
215
237
|
|
|
@@ -219,6 +241,7 @@ export interface WeChatPayParams {
|
|
|
219
241
|
appId: string;
|
|
220
242
|
billingDetails?: BillingDetails;
|
|
221
243
|
mandateData?: MandateData;
|
|
244
|
+
metadata?: MetaData;
|
|
222
245
|
};
|
|
223
246
|
}
|
|
224
247
|
|
|
@@ -234,6 +257,7 @@ export type AffirmParams = {
|
|
|
234
257
|
shippingDetails?: BillingDetails;
|
|
235
258
|
billingDetails?: BillingDetails;
|
|
236
259
|
mandateData?: MandateData;
|
|
260
|
+
metadata?: MetaData;
|
|
237
261
|
};
|
|
238
262
|
};
|
|
239
263
|
|
|
@@ -252,6 +276,7 @@ export type USBankAccountParams = {
|
|
|
252
276
|
/** Defaults to Checking */
|
|
253
277
|
accountType?: BankAcccountType;
|
|
254
278
|
mandateData?: MandateData;
|
|
279
|
+
metadata?: MetaData;
|
|
255
280
|
};
|
|
256
281
|
};
|
|
257
282
|
|
|
@@ -260,6 +285,7 @@ export type PayPalParams = {
|
|
|
260
285
|
paymentMethodData?: {
|
|
261
286
|
billingDetails?: BillingDetails;
|
|
262
287
|
mandateData?: MandateData;
|
|
288
|
+
metadata?: MetaData;
|
|
263
289
|
};
|
|
264
290
|
};
|
|
265
291
|
|
|
@@ -268,6 +294,7 @@ export type CashAppParams = {
|
|
|
268
294
|
paymentMethodData?: {
|
|
269
295
|
billingDetails?: BillingDetails;
|
|
270
296
|
mandateData?: MandateData;
|
|
297
|
+
metadata?: MetaData;
|
|
271
298
|
};
|
|
272
299
|
};
|
|
273
300
|
|
|
@@ -276,6 +303,7 @@ export type RevolutPayParams = {
|
|
|
276
303
|
paymentMethodData?: {
|
|
277
304
|
billingDetails?: BillingDetails;
|
|
278
305
|
mandateData?: MandateData;
|
|
306
|
+
metadata?: MetaData;
|
|
279
307
|
};
|
|
280
308
|
};
|
|
281
309
|
|
|
@@ -287,5 +315,6 @@ export type CollectBankAccountParams = {
|
|
|
287
315
|
email?: string;
|
|
288
316
|
};
|
|
289
317
|
mandateData?: MandateData;
|
|
318
|
+
metadata?: MetaData;
|
|
290
319
|
};
|
|
291
320
|
};
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
} from './Token';
|
|
7
7
|
import type { FutureUsage } from './PaymentIntent';
|
|
8
8
|
import type { Address, BillingDetails } from './Common';
|
|
9
|
+
import type { FinancialConnectionsEvent } from './FinancialConnections';
|
|
9
10
|
|
|
10
11
|
export interface Result {
|
|
11
12
|
id: string;
|
|
@@ -313,4 +314,11 @@ export type CollectBankAccountParams = {
|
|
|
313
314
|
email?: string;
|
|
314
315
|
};
|
|
315
316
|
};
|
|
317
|
+
/** An optional event listener to receive @type {FinancialConnectionEvent} for specific events during the process of a user connecting their financial accounts. */
|
|
318
|
+
onEvent?: (event: FinancialConnectionsEvent) => void;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
export type CollectBankAccountTokenParams = {
|
|
322
|
+
/** An optional event listener to receive @type {FinancialConnectionEvent} for specific events during the process of a user connecting their financial accounts. */
|
|
323
|
+
onEvent?: (event: FinancialConnectionsEvent) => void;
|
|
316
324
|
};
|
|
@@ -10,7 +10,7 @@ import type { FutureUsage } from './PaymentIntent';
|
|
|
10
10
|
import type { Result } from './PaymentMethod';
|
|
11
11
|
import type { StripeError } from './Errors';
|
|
12
12
|
|
|
13
|
-
type SetupParamsBase = IntentParams & {
|
|
13
|
+
export type SetupParamsBase = IntentParams & {
|
|
14
14
|
/** Your customer-facing business name. On Android, this is required and cannot be an empty string. */
|
|
15
15
|
merchantDisplayName: string;
|
|
16
16
|
/** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */
|
|
@@ -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 = '~> 24.
|
|
5
|
+
stripe_version = '~> 24.4.0'
|
|
6
6
|
|
|
7
7
|
Pod::Spec.new do |s|
|
|
8
8
|
s.name = 'stripe-react-native'
|