Skip to content

Commit

Permalink
sync with react native 0.38.4 (#1922)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Bark <[email protected]>
  • Loading branch information
remonh87 and jonasbark authored Sep 18, 2024
1 parent c22a92f commit 510a2ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PaymentSheetFragment(
val billingDetailsBundle = arguments?.getBundle("defaultBillingDetails")
val billingConfigParams = arguments?.getBundle("billingDetailsCollectionConfiguration")
val paymentMethodOrder = arguments?.getStringArrayList("paymentMethodOrder")
val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod")
val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod", true) ?: true
paymentIntentClientSecret = arguments?.getString("paymentIntentClientSecret").orEmpty()
setupIntentClientSecret = arguments?.getString("setupIntentClientSecret").orEmpty()
intentConfiguration = try {
Expand Down Expand Up @@ -201,7 +201,7 @@ class PaymentSheetFragment(
.shippingDetails(shippingDetails)
.billingDetailsCollectionConfiguration(billingDetailsConfig)
.preferredNetworks(mapToPreferredNetworks(arguments?.getIntegerArrayList("preferredNetworks")))
.allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod ?: true)
.allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod)
primaryButtonLabel?.let {
configurationBuilder.primaryButtonLabel(it)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CustomerSheetFragment : Fragment() {
val customerId = arguments?.getString("customerId")
val customerEphemeralKeySecret = arguments?.getString("customerEphemeralKeySecret")
val customerAdapterOverrideParams = arguments?.getBundle("customerAdapter")
val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod")
val allowsRemovalOfLastSavedPaymentMethod = arguments?.getBoolean("allowsRemovalOfLastSavedPaymentMethod", true) ?: true
val paymentMethodOrder = arguments?.getStringArrayList("paymentMethodOrder")
if (customerId == null) {
initPromise.resolve(createError(ErrorType.Failed.toString(), "You must provide a value for `customerId`"))
Expand All @@ -91,7 +91,7 @@ class CustomerSheetFragment : Fragment() {
.googlePayEnabled(googlePayEnabled)
.headerTextForSelectionScreen(headerTextForSelectionScreen)
.preferredNetworks(mapToPreferredNetworks(arguments?.getIntegerArrayList("preferredNetworks")))
.allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod ?: true)
.allowsRemovalOfLastSavedPaymentMethod(allowsRemovalOfLastSavedPaymentMethod)

paymentMethodOrder?.let {
configuration.paymentMethodOrder(it)
Expand Down

0 comments on commit 510a2ab

Please sign in to comment.