Skip to content

Commit

Permalink
Upgrade 3DS2 SDK to 4.0.5 (#2708)
Browse files Browse the repository at this point in the history
Fixes #2698
  • Loading branch information
mshafrir-stripe authored Aug 13, 2020
1 parent 855e1d6 commit 023a6ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stripe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
// Api for this import because we use reflection to alter TextInputLayout
api 'com.google.android.material:material:1.1.0'

implementation "com.stripe:stripe-3ds2-android:4.0.4"
implementation "com.stripe:stripe-3ds2-android:4.0.5"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,7 @@ internal class StripePaymentController internal constructor(
)

workScope.launch {
// call `authenticationRequestParameters` on background thread to avoid StrictMode
// DiskReadViolation
val areqParams = transaction.authenticationRequestParameters
val areqParams = transaction.createAuthenticationRequestParameters()

val timeout = config.stripe3ds2Config.timeout
val authParams = Stripe3ds2AuthParams(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import com.stripe.android.view.PaymentRelayActivity
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import org.junit.runner.RunWith
Expand Down Expand Up @@ -83,8 +84,10 @@ class StripePaymentControllerTest {

@BeforeTest
fun setup() {
whenever(transaction.authenticationRequestParameters)
.thenReturn(Stripe3ds2Fixtures.AREQ_PARAMS)
runBlocking {
whenever(transaction.createAuthenticationRequestParameters())
.thenReturn(Stripe3ds2Fixtures.AREQ_PARAMS)
}
whenever(activity.applicationContext)
.thenReturn(context)
}
Expand Down

0 comments on commit 023a6ec

Please sign in to comment.