Skip to content

Release 7.0.0

Choose a tag to compare

@stefan-tudor stefan-tudor released this 09 Jun 12:14
· 12 commits to master since this release
344f3a3

This is a major release containing significant API breaking changes as part of a large internal refactoring. Please review the migration notes below before upgrading.


Breaking Changes

CardTransactionManager removed → JudoCardTransactionClient

CardTransactionManager (singleton, activity-bound) has been replaced by the stateless JudoCardTransactionClient.

Before:

CardTransactionManager.getInstance(activity)
    .configureWith(judo)
    .registerResultListener(listener)
    .payment(transactionDetails, tag)

After:

val client = JudoCardTransactionClient.create(context, judo)
client.payment(context, transactionDetails, callback)
// or with coroutines:
val result = client.payment(context, transactionDetails)

CardTransactionManagerResultListener → JudoCardTransactionCallback (same single-method contract).
ActivityAwareComponent, and SingletonHolder have been removed.


New Activity Result API (JudoActivityResultContracts)

A set of typed ActivityResultContract implementations is now available, replacing direct Intent construction.

val launcher = registerForActivityResult(JudoActivityResultContracts.CardPayment()) { result ->
    // handle JudoPaymentResult
}
launcher.launch(judo)

Available contracts: CardPayment, CardPreAuth, CardTokenPayment, CardTokenPreAuth, CheckCard, CreateCardToken, GooglePay, PreAuthGooglePay, PaymentMethods, PreAuthPaymentMethods, ServerToServerPaymentMethods.

JudoActivity.Companion.createIntent(context, judo) is also available for cases where a direct Intent is still needed.


New APIs

  • JudoCardTransactionClient — context-based, coroutine and callback-friendly card transaction client.
  • JudoCardTransactionCallback — single-method result callback interface.
  • JudoActivityResultContracts — typed Activity Result contracts per payment type.

Dependency Updates

Dependency Before After
judo3ds2 1.8.0 2.0.1
ravelin-encrypt 3.1.0 7.0.0

In details

Full Changelog: v6.2.0...v7.0.0