-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement embeddedViewDisplaysMandateText. (#9906)
- Loading branch information
1 parent
a8b5ca7
commit 83ebb13
Showing
7 changed files
with
124 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../paymentsheet/example/playground/settings/EmbeddedViewDisplaysMandateSettingDefinition.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.stripe.android.paymentsheet.example.playground.settings | ||
|
||
import com.stripe.android.paymentelement.EmbeddedPaymentElement | ||
import com.stripe.android.paymentelement.ExperimentalEmbeddedPaymentElementApi | ||
import com.stripe.android.paymentsheet.example.playground.PlaygroundState | ||
|
||
@OptIn(ExperimentalEmbeddedPaymentElementApi::class) | ||
internal object EmbeddedViewDisplaysMandateSettingDefinition : BooleanSettingsDefinition( | ||
key = "embeddedViewDisplaysMandate", | ||
displayName = "Embedded View Displays Mandate", | ||
defaultValue = true, | ||
) { | ||
override fun applicable(configurationData: PlaygroundConfigurationData): Boolean { | ||
return configurationData.integrationType == PlaygroundConfigurationData.IntegrationType.Embedded | ||
} | ||
|
||
override fun configure( | ||
value: Boolean, | ||
configurationBuilder: EmbeddedPaymentElement.Configuration.Builder, | ||
playgroundState: PlaygroundState.Payment, | ||
configurationData: PlaygroundSettingDefinition.EmbeddedConfigurationData | ||
) { | ||
configurationBuilder.embeddedViewDisplaysMandateText(value) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters