Skip to content

Commit 7e202a3

Browse files
Merge branch 'master' into porter/mandate-text
2 parents 29fc0ac + 8cdb3c4 commit 7e202a3

11 files changed

Lines changed: 154 additions & 119 deletions

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# CHANGELOG
22

3-
## x.x.x - x-x-x
3+
## 0.50.2 - 2025-08-06
4+
5+
**Changes**
6+
- Renamed `RowStyle.FlatWithChevron` to `RowStyle.FlatWithDisclosure` and updated related interfaces (`ChevronConfig``DisclosureConfig`).
7+
- Updated `stripe-ios` to 24.19.0
8+
- Updated `stripe-android` to 21.22.+
9+
- Added `successBackgroundColor` and `successTextColor` properties to `PrimaryButtonColorConfig` for customizing the primary button appearance in success states.
410

511
**Fixes**
612
- Fixed missing `onCustomPaymentMethodConfirmHandlerCallback` in old architecture codegen patch. This resolves pod install failures when using React Native 0.74+ with old architecture and custom payment methods.
13+
- Fixes an issue where saved payment methods weren't auto selected when using `EmbeddedPaymentElement` on Android.
714

815
## 0.50.1 - 2025-07-22
916

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ StripeSdk_compileSdkVersion=30
33
StripeSdk_targetSdkVersion=28
44
StripeSdk_minSdkVersion=21
55
# Keep StripeSdk_stripeVersion in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/android/gradle.properties
6-
StripeSdk_stripeVersion=21.19.+
6+
StripeSdk_stripeVersion=21.22.+

android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ private fun buildPrimaryButton(
194194

195195
return PaymentSheet.PrimaryButton(
196196
colorsLight =
197-
buildPrimaryButtonColors(lightColorParams, PaymentSheet.PrimaryButtonColors.defaultLight),
197+
buildPrimaryButtonColors(lightColorParams, PaymentSheet.PrimaryButtonColors.defaultLight, context),
198198
colorsDark =
199-
buildPrimaryButtonColors(darkColorParams, PaymentSheet.PrimaryButtonColors.defaultDark),
199+
buildPrimaryButtonColors(darkColorParams, PaymentSheet.PrimaryButtonColors.defaultDark, context),
200200
shape =
201201
PaymentSheet.PrimaryButtonShape(
202202
cornerRadiusDp =
@@ -217,6 +217,7 @@ private fun buildPrimaryButton(
217217
private fun buildPrimaryButtonColors(
218218
colorParams: Bundle,
219219
default: PaymentSheet.PrimaryButtonColors,
220+
context: Context,
220221
): PaymentSheet.PrimaryButtonColors =
221222
PaymentSheet.PrimaryButtonColors(
222223
background =
@@ -243,6 +244,20 @@ private fun buildPrimaryButtonColors(
243244
colorParams.getString(PaymentSheetAppearanceKeys.BORDER),
244245
default.border,
245246
),
247+
successBackgroundColor =
248+
dynamicColorFromParams(
249+
context,
250+
colorParams,
251+
PaymentSheetAppearanceKeys.SUCCESS_BACKGROUND,
252+
default.successBackgroundColor,
253+
),
254+
onSuccessBackgroundColor =
255+
dynamicColorFromParams(
256+
context,
257+
colorParams,
258+
PaymentSheetAppearanceKeys.SUCCESS_TEXT,
259+
default.onSuccessBackgroundColor,
260+
),
246261
)
247262

248263
@SuppressLint("RestrictedApi")
@@ -341,7 +356,7 @@ private fun buildEmbeddedAppearance(
341356
val checkmarkParams = getBundleOrNull(flatParams, PaymentSheetAppearanceKeys.CHECKMARK)
342357
val separatorInsetsParams = getBundleOrNull(flatParams, PaymentSheetAppearanceKeys.SEPARATOR_INSETS)
343358

344-
// Default separator insets specific to FlatWithCheckmark and FlatWithChevron
359+
// Default separator insets specific to FlatWithCheckmark and FlatWithDisclosure
345360
val defaultSeparatorStartInsetDp = 0.0f
346361
val defaultSeparatorEndInsetDp = 0.0f
347362

@@ -392,12 +407,12 @@ private fun buildEmbeddedAppearance(
392407
colorsDark = flatCheckmarkColors,
393408
)
394409
}
395-
"flatWithChevron" -> {
410+
"flatWithDisclosure" -> {
396411
val flatParams = getBundleOrNull(rowParams, PaymentSheetAppearanceKeys.FLAT)
397-
val chevronParams = getBundleOrNull(flatParams, PaymentSheetAppearanceKeys.CHEVRON)
412+
val disclosureParams = getBundleOrNull(flatParams, PaymentSheetAppearanceKeys.DISCLOSURE)
398413
val separatorInsetsParams = getBundleOrNull(flatParams, PaymentSheetAppearanceKeys.SEPARATOR_INSETS)
399414

400-
// Default separator insets specific to FlatWithCheckmark and FlatWithChevron
415+
// Default separator insets specific to FlatWithCheckmark and FlatWithDisclosure
401416
val defaultSeparatorStartInsetDp = 0.0f
402417
val defaultSeparatorEndInsetDp = 0.0f
403418

@@ -418,32 +433,33 @@ private fun buildEmbeddedAppearance(
418433
Color.GRAY,
419434
)
420435

421-
val parsedChevronColor =
436+
val parsedDisclosureColor =
422437
dynamicColorFromParams(
423438
context,
424-
chevronParams,
439+
disclosureParams,
425440
PaymentSheetAppearanceKeys.COLOR,
426441
defaultColors.componentBorder, // Default to component border color like other elements
427442
)
428443

429444
// Create the required Colors object
430-
val flatChevronColors =
431-
PaymentSheet.Appearance.Embedded.RowStyle.FlatWithChevron.Colors(
445+
val flatDisclosureColors =
446+
PaymentSheet.Appearance.Embedded.RowStyle.FlatWithDisclosure.Colors(
432447
separatorColor = parsedSeparatorColor,
433-
chevronColor = parsedChevronColor,
448+
disclosureColor = parsedDisclosureColor,
434449
)
435450

436-
PaymentSheet.Appearance.Embedded.RowStyle.FlatWithChevron(
437-
separatorThicknessDp = separatorThickness,
438-
startSeparatorInsetDp = startSeparatorInset,
439-
endSeparatorInsetDp = endSeparatorInset,
440-
topSeparatorEnabled = topEnabled,
441-
bottomSeparatorEnabled = bottomEnabled,
442-
additionalVerticalInsetsDp = additionalInsets,
443-
horizontalInsetsDp = 0.0F, // We do not have an iOS equal for this API so it's not configurable in React Native
444-
colorsLight = flatChevronColors,
445-
colorsDark = flatChevronColors,
446-
)
451+
PaymentSheet.Appearance.Embedded.RowStyle.FlatWithDisclosure
452+
.Builder()
453+
.separatorThicknessDp(separatorThickness)
454+
.startSeparatorInsetDp(startSeparatorInset)
455+
.endSeparatorInsetDp(endSeparatorInset)
456+
.topSeparatorEnabled(topEnabled)
457+
.bottomSeparatorEnabled(bottomEnabled)
458+
.additionalVerticalInsetsDp(additionalInsets)
459+
.horizontalInsetsDp(0.0F) // We do not have an iOS equal for this API so it's not configurable in React Native
460+
.colorsLight(flatDisclosureColors)
461+
.colorsDark(flatDisclosureColors)
462+
.build()
447463
}
448464
"floatingButton" -> {
449465
val floatingParams = getBundleOrNull(rowParams, PaymentSheetAppearanceKeys.FLOATING)
@@ -654,6 +670,8 @@ private class PaymentSheetAppearanceKeys {
654670
const val PRIMARY_BUTTON = "primaryButton"
655671
const val TEXT = "text"
656672
const val BORDER = "border"
673+
const val SUCCESS_BACKGROUND = "successBackgroundColor"
674+
const val SUCCESS_TEXT = "successTextColor"
657675

658676
const val EMBEDDED_PAYMENT_ELEMENT = "embeddedPaymentElement"
659677
const val ROW = "row"
@@ -670,7 +688,7 @@ private class PaymentSheetAppearanceKeys {
670688
const val SELECTED_COLOR = "selectedColor"
671689
const val UNSELECTED_COLOR = "unselectedColor"
672690
const val CHECKMARK = "checkmark"
673-
const val CHEVRON = "chevron"
691+
const val DISCLOSURE = "disclosure"
674692
const val COLOR = "color"
675693
const val CHECKMARK_INSET = "inset"
676694

example/ios/Podfile.lock

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,13 +1685,13 @@ PODS:
16851685
- ReactCommon/turbomodule/core
16861686
- Yoga
16871687
- SocketRocket (0.7.1)
1688-
- Stripe (24.16.1):
1689-
- StripeApplePay (= 24.16.1)
1690-
- StripeCore (= 24.16.1)
1691-
- StripePayments (= 24.16.1)
1692-
- StripePaymentsUI (= 24.16.1)
1693-
- StripeUICore (= 24.16.1)
1694-
- stripe-react-native (0.49.0):
1688+
- Stripe (24.19.0):
1689+
- StripeApplePay (= 24.19.0)
1690+
- StripeCore (= 24.19.0)
1691+
- StripePayments (= 24.19.0)
1692+
- StripePaymentsUI (= 24.19.0)
1693+
- StripeUICore (= 24.19.0)
1694+
- stripe-react-native (0.50.1):
16951695
- DoubleConversion
16961696
- glog
16971697
- hermes-engine
@@ -1711,15 +1711,15 @@ PODS:
17111711
- ReactCodegen
17121712
- ReactCommon/turbomodule/bridging
17131713
- ReactCommon/turbomodule/core
1714-
- Stripe (~> 24.16.1)
1715-
- stripe-react-native/NewArch (= 0.49.0)
1716-
- StripeApplePay (~> 24.16.1)
1717-
- StripeFinancialConnections (~> 24.16.1)
1718-
- StripePayments (~> 24.16.1)
1719-
- StripePaymentSheet (~> 24.16.1)
1720-
- StripePaymentsUI (~> 24.16.1)
1714+
- Stripe (~> 24.19.0)
1715+
- stripe-react-native/NewArch (= 0.50.1)
1716+
- StripeApplePay (~> 24.19.0)
1717+
- StripeFinancialConnections (~> 24.19.0)
1718+
- StripePayments (~> 24.19.0)
1719+
- StripePaymentSheet (~> 24.19.0)
1720+
- StripePaymentsUI (~> 24.19.0)
17211721
- Yoga
1722-
- stripe-react-native/NewArch (0.49.0):
1722+
- stripe-react-native/NewArch (0.50.1):
17231723
- DoubleConversion
17241724
- glog
17251725
- hermes-engine
@@ -1739,14 +1739,14 @@ PODS:
17391739
- ReactCodegen
17401740
- ReactCommon/turbomodule/bridging
17411741
- ReactCommon/turbomodule/core
1742-
- Stripe (~> 24.16.1)
1743-
- StripeApplePay (~> 24.16.1)
1744-
- StripeFinancialConnections (~> 24.16.1)
1745-
- StripePayments (~> 24.16.1)
1746-
- StripePaymentSheet (~> 24.16.1)
1747-
- StripePaymentsUI (~> 24.16.1)
1742+
- Stripe (~> 24.19.0)
1743+
- StripeApplePay (~> 24.19.0)
1744+
- StripeFinancialConnections (~> 24.19.0)
1745+
- StripePayments (~> 24.19.0)
1746+
- StripePaymentSheet (~> 24.19.0)
1747+
- StripePaymentsUI (~> 24.19.0)
17481748
- Yoga
1749-
- stripe-react-native/Tests (0.49.0):
1749+
- stripe-react-native/Tests (0.50.1):
17501750
- DoubleConversion
17511751
- glog
17521752
- hermes-engine
@@ -1766,35 +1766,35 @@ PODS:
17661766
- ReactCodegen
17671767
- ReactCommon/turbomodule/bridging
17681768
- ReactCommon/turbomodule/core
1769-
- Stripe (~> 24.16.1)
1770-
- StripeApplePay (~> 24.16.1)
1771-
- StripeFinancialConnections (~> 24.16.1)
1772-
- StripePayments (~> 24.16.1)
1773-
- StripePaymentSheet (~> 24.16.1)
1774-
- StripePaymentsUI (~> 24.16.1)
1769+
- Stripe (~> 24.19.0)
1770+
- StripeApplePay (~> 24.19.0)
1771+
- StripeFinancialConnections (~> 24.19.0)
1772+
- StripePayments (~> 24.19.0)
1773+
- StripePaymentSheet (~> 24.19.0)
1774+
- StripePaymentsUI (~> 24.19.0)
17751775
- Yoga
1776-
- StripeApplePay (24.16.1):
1777-
- StripeCore (= 24.16.1)
1778-
- StripeCore (24.16.1)
1779-
- StripeFinancialConnections (24.16.1):
1780-
- StripeCore (= 24.16.1)
1781-
- StripeUICore (= 24.16.1)
1782-
- StripePayments (24.16.1):
1783-
- StripeCore (= 24.16.1)
1784-
- StripePayments/Stripe3DS2 (= 24.16.1)
1785-
- StripePayments/Stripe3DS2 (24.16.1):
1786-
- StripeCore (= 24.16.1)
1787-
- StripePaymentSheet (24.16.1):
1788-
- StripeApplePay (= 24.16.1)
1789-
- StripeCore (= 24.16.1)
1790-
- StripePayments (= 24.16.1)
1791-
- StripePaymentsUI (= 24.16.1)
1792-
- StripePaymentsUI (24.16.1):
1793-
- StripeCore (= 24.16.1)
1794-
- StripePayments (= 24.16.1)
1795-
- StripeUICore (= 24.16.1)
1796-
- StripeUICore (24.16.1):
1797-
- StripeCore (= 24.16.1)
1776+
- StripeApplePay (24.19.0):
1777+
- StripeCore (= 24.19.0)
1778+
- StripeCore (24.19.0)
1779+
- StripeFinancialConnections (24.19.0):
1780+
- StripeCore (= 24.19.0)
1781+
- StripeUICore (= 24.19.0)
1782+
- StripePayments (24.19.0):
1783+
- StripeCore (= 24.19.0)
1784+
- StripePayments/Stripe3DS2 (= 24.19.0)
1785+
- StripePayments/Stripe3DS2 (24.19.0):
1786+
- StripeCore (= 24.19.0)
1787+
- StripePaymentSheet (24.19.0):
1788+
- StripeApplePay (= 24.19.0)
1789+
- StripeCore (= 24.19.0)
1790+
- StripePayments (= 24.19.0)
1791+
- StripePaymentsUI (= 24.19.0)
1792+
- StripePaymentsUI (24.19.0):
1793+
- StripeCore (= 24.19.0)
1794+
- StripePayments (= 24.19.0)
1795+
- StripeUICore (= 24.19.0)
1796+
- StripeUICore (24.19.0):
1797+
- StripeCore (= 24.19.0)
17981798
- Yoga (0.0.0)
17991799

18001800
DEPENDENCIES:
@@ -2109,15 +2109,15 @@ SPEC CHECKSUMS:
21092109
RNCPicker: ffbd7b9fc7c1341929e61dbef6219f7860f57418
21102110
RNScreens: 991214b4e69016c1ae32830d9cea31c9c9422367
21112111
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2112-
Stripe: 4a3519963904b46b2a5a051022f4e67d2831aff6
2113-
stripe-react-native: d1a3ffe2f89dcbe2ab68d8e0fd19f7af7d5863b4
2114-
StripeApplePay: 4303d484ec3b43d96b73a3127470674f8484a27d
2115-
StripeCore: 45ccc543ea1d54f00f03dd4813b4ab1071ae5d34
2116-
StripeFinancialConnections: 983bd6b15f8a1e7be40943bc5a87b41aa2acb3f7
2117-
StripePayments: 3f3cd1970de45f1d26d263bb5a6be5cfd9df93eb
2118-
StripePaymentSheet: edfe0ecd4d1d25ac3a3bda7c53e80e7c2df7a1e0
2119-
StripePaymentsUI: f3e663c841a0c9303e315f61db145f96667db9c0
2120-
StripeUICore: 1ddbdd49d9fde119d9e64c17e7e79d49c29ccb98
2112+
Stripe: d1824162e4bcb6ead10401a0dc8e8a3d5ffee41f
2113+
stripe-react-native: 0a175dece5787169285638bb62d071d72f75ec0b
2114+
StripeApplePay: eb64705d3c919492b1b28876652fd0aca2db38cc
2115+
StripeCore: b5bee05167f0c8ccce936244a031a9972fdeade8
2116+
StripeFinancialConnections: fd6c661f86f47b1d26a32f588b3a0b09826aba84
2117+
StripePayments: cf00b3c85cd7b57e40f622493f81bdf361cb3982
2118+
StripePaymentSheet: b126816213ae4f56ff4525ad25f94bb985a43e27
2119+
StripePaymentsUI: 05d4be35b34f821d5ddc8617dee04219f3646253
2120+
StripeUICore: d07bd63a4b53dee8cab4d6f81ce5a7ab3e28511e
21212121
Yoga: 9b7fb56e7b08cde60e2153344fa6afbd88e5d99f
21222122

21232123
PODFILE CHECKSUM: a2ed964678852d4cc306ff4add3e4fa90be77ea6

example/src/screens/EmbeddedPaymentElementImmediateActionScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ export default function EmbeddedPaymentElementImmediateActionScreen() {
141141
},
142142
embeddedPaymentElement: {
143143
row: {
144-
style: RowStyle.FlatWithChevron,
144+
style: RowStyle.FlatWithDisclosure,
145145
flat: {
146-
chevron: { color: '#90EE90' }, // Light green color
146+
disclosure: { color: '#90EE90' }, // Light green color
147147
},
148148
},
149149
},

example/src/screens/EmbeddedPaymentElementScreen.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ export default function EmbeddedPaymentElementScreen() {
149149
const darkBorderColor = '#48484A'; // Dark mode border
150150
const darkSecondaryText = '#8E8E93'; // Dark mode secondary text
151151

152+
// Blurple colors for success states
153+
const blurple = '#635BFF'; // Stripe's signature blurple color
154+
const blurpleText = '#FFFFFF'; // White text on blurple
155+
152156
const appearance: AppearanceParams = {
153157
colors: {
154158
light: {
@@ -199,12 +203,16 @@ export default function EmbeddedPaymentElementScreen() {
199203
background: actionPink,
200204
text: brandWhite, // White text on pink
201205
border: '00000000', // No border color needed
202-
},
206+
successBackgroundColor: blurple, // Blurple success background
207+
successTextColor: blurpleText, // White text on blurple
208+
} as any,
203209
dark: {
204210
background: actionPink,
205211
text: brandWhite, // White text on pink
206212
border: '#00000000', // No border color needed
207-
},
213+
successBackgroundColor: blurple, // Blurple success background
214+
successTextColor: blurpleText, // White text on blurple
215+
} as any,
208216
},
209217
},
210218
embeddedPaymentElement: {

0 commit comments

Comments
 (0)