diff --git a/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt b/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt index 8742077a038..beccc09596f 100644 --- a/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt +++ b/example/src/androidTestDebug/java/com/stripe/example/activity/AddFpxPaymentMethodTest.kt @@ -12,8 +12,6 @@ import androidx.test.ext.junit.rules.activityScenarioRule import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.LargeTest import com.stripe.android.CustomerSession -import com.stripe.android.EphemeralKeyProvider -import com.stripe.android.EphemeralKeyUpdateListener import com.stripe.example.R import org.junit.Before import org.junit.Rule @@ -32,12 +30,8 @@ class AddFpxPaymentMethodTest { fun setup() { CustomerSession.initCustomerSession( context, - object : EphemeralKeyProvider { - override fun createEphemeralKey( - apiVersion: String, - keyUpdateListener: EphemeralKeyUpdateListener - ) { - } + ephemeralKeyProvider = { _, _ -> + // noop } ) } diff --git a/example/src/main/java/com/stripe/example/ExampleApplication.kt b/example/src/main/java/com/stripe/example/ExampleApplication.kt index 1698de5f16e..b456c62d5bf 100644 --- a/example/src/main/java/com/stripe/example/ExampleApplication.kt +++ b/example/src/main/java/com/stripe/example/ExampleApplication.kt @@ -51,6 +51,6 @@ class ExampleApplication : Application() { } private companion object { - private val IS_PENALTY_DEATH_ENABLED = false + private const val IS_PENALTY_DEATH_ENABLED = false } } diff --git a/stripe/src/main/java/com/stripe/android/EphemeralKeyProvider.kt b/stripe/src/main/java/com/stripe/android/EphemeralKeyProvider.kt index 3b81a5a7fb4..f286bbfec04 100644 --- a/stripe/src/main/java/com/stripe/android/EphemeralKeyProvider.kt +++ b/stripe/src/main/java/com/stripe/android/EphemeralKeyProvider.kt @@ -6,7 +6,7 @@ import androidx.annotation.Size * Represents an object that can call to a server and create * [EphemeralKeys][EphemeralKey]. */ -interface EphemeralKeyProvider { +fun interface EphemeralKeyProvider { /** * When called, talks to a client server that then communicates with Stripe's servers to