diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/Utils.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/Utils.kt index 30049cf09..b0e254dfe 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/Utils.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/Utils.kt @@ -103,4 +103,4 @@ internal fun JSONObject.getStringOrNull(fieldName: String): String? { internal fun JSONObject.hasNonNull(fieldName: String): Boolean { return has(fieldName) && !isNull(fieldName) -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/encryptkey/EncryptionKeyService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/encryptkey/EncryptionKeyService.kt index 440a8a4d0..883fca155 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/encryptkey/EncryptionKeyService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/encryptkey/EncryptionKeyService.kt @@ -1,11 +1,11 @@ package com.joinforage.forage.android.core.services.forageapi.encryptkey import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.addTrailingSlash import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.NetworkService +import com.joinforage.forage.android.core.services.telemetry.Log import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.OkHttpClient diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/Payment.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/Payment.kt index 9ddc2c3b6..e6ae9834e 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/Payment.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/Payment.kt @@ -1,9 +1,9 @@ package com.joinforage.forage.android.core.services.forageapi.payment -import com.joinforage.forage.android.core.services.getStringOrNull -import com.joinforage.forage.android.core.services.hasNonNull import com.joinforage.forage.android.core.services.forageapi.paymentmethod.Balance import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance +import com.joinforage.forage.android.core.services.getStringOrNull +import com.joinforage.forage.android.core.services.hasNonNull import org.json.JSONArray import org.json.JSONObject diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/PaymentService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/PaymentService.kt index 98ee3a3ff..b9d6d59bc 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/PaymentService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/payment/PaymentService.kt @@ -1,11 +1,11 @@ package com.joinforage.forage.android.core.services.forageapi.payment import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.addTrailingSlash import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.NetworkService +import com.joinforage.forage.android.core.services.telemetry.Log import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.OkHttpClient diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethod.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethod.kt index a28e1f2c7..a06521fa3 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethod.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethod.kt @@ -32,4 +32,4 @@ data class PaymentMethod( card = EbtCard(jsonObject.getJSONObject("card")), reusable = jsonObject.optBoolean("reusable", true) ) -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethodService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethodService.kt index 1f4f1fe2d..2ffc6f312 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethodService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/paymentmethod/PaymentMethodService.kt @@ -1,11 +1,11 @@ package com.joinforage.forage.android.core.services.forageapi.paymentmethod import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.addTrailingSlash import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.NetworkService +import com.joinforage.forage.android.core.services.telemetry.Log import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.OkHttpClient diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/MessageStatusService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/MessageStatusService.kt index 3d251c2f7..7873a305f 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/MessageStatusService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/MessageStatusService.kt @@ -1,11 +1,11 @@ package com.joinforage.forage.android.core.services.forageapi.polling import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.addTrailingSlash import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.NetworkService +import com.joinforage.forage.android.core.services.telemetry.Log import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.OkHttpClient diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/PollingService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/PollingService.kt index a978d251e..e0a40d963 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/PollingService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/forageapi/polling/PollingService.kt @@ -1,10 +1,10 @@ package com.joinforage.forage.android.core.services.forageapi.polling -import com.joinforage.forage.android.core.services.launchdarkly.LDManager -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.getJitterAmount +import com.joinforage.forage.android.core.services.launchdarkly.LDManager +import com.joinforage.forage.android.core.services.telemetry.Log import kotlinx.coroutines.delay internal class PollingService( diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/AbstractVaultSubmitter.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/AbstractVaultSubmitter.kt index fd0bf09d8..71fc6f122 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/AbstractVaultSubmitter.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/AbstractVaultSubmitter.kt @@ -1,17 +1,17 @@ package com.joinforage.forage.android.core.services.vault import android.content.Context -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.telemetry.UserAction -import com.joinforage.forage.android.core.services.telemetry.VaultProxyResponseMonitor -import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod import com.joinforage.forage.android.core.services.ForageConstants +import com.joinforage.forage.android.core.services.VaultType +import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.UnknownErrorApiResponse -import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod +import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.telemetry.UserAction +import com.joinforage.forage.android.core.services.telemetry.VaultProxyResponseMonitor import com.joinforage.forage.android.core.ui.element.ForagePinElement internal val IncompletePinError = ForageApiResponse.Failure.fromError( @@ -35,7 +35,7 @@ internal interface VaultSubmitter { internal abstract class AbstractVaultSubmitter( protected val context: Context, protected val foragePinEditText: ForagePinElement, - protected val logger: Log, + protected val logger: Log ) : VaultSubmitter { abstract val vaultType: VaultType @@ -174,6 +174,5 @@ internal abstract class AbstractVaultSubmitter( internal fun deferPaymentCapturePath(paymentRef: String) = "/api/payments/$paymentRef/collect_pin/" - } } diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CapturePaymentRepository.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CapturePaymentRepository.kt index cf913b5a3..efaa7979c 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CapturePaymentRepository.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CapturePaymentRepository.kt @@ -1,16 +1,16 @@ package com.joinforage.forage.android.core.services.vault import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService -import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService -import com.joinforage.forage.android.core.services.forageapi.polling.PollingService -import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.payment.Payment +import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService import com.joinforage.forage.android.core.services.forageapi.polling.Message +import com.joinforage.forage.android.core.services.forageapi.polling.PollingService +import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.telemetry.UserAction internal class CapturePaymentRepository( private val vaultSubmitter: VaultSubmitter, diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CheckBalanceRepository.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CheckBalanceRepository.kt index d3fc89f57..afaef1f71 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CheckBalanceRepository.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/CheckBalanceRepository.kt @@ -1,14 +1,14 @@ package com.joinforage.forage.android.core.services.vault import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService -import com.joinforage.forage.android.core.services.forageapi.polling.PollingService -import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService import com.joinforage.forage.android.core.services.forageapi.polling.Message +import com.joinforage.forage.android.core.services.forageapi.polling.PollingService +import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.telemetry.UserAction import java.util.UUID internal class CheckBalanceRepository( diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/DeferPaymentCaptureRepository.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/DeferPaymentCaptureRepository.kt index f6924344d..13fb9c6f3 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/DeferPaymentCaptureRepository.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/DeferPaymentCaptureRepository.kt @@ -1,13 +1,13 @@ package com.joinforage.forage.android.core.services.vault import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService -import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService -import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.payment.Payment +import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService +import com.joinforage.forage.android.core.services.telemetry.UserAction import java.util.UUID internal class DeferPaymentCaptureRepository( diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/TokenizeCardService.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/TokenizeCardService.kt index fc37b8dfa..7a5b16b82 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/TokenizeCardService.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/TokenizeCardService.kt @@ -1,13 +1,13 @@ package com.joinforage.forage.android.core.services.vault import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.addTrailingSlash -import com.joinforage.forage.android.core.services.forageapi.network.NetworkService import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError +import com.joinforage.forage.android.core.services.forageapi.network.NetworkService import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodRequestBody import com.joinforage.forage.android.core.services.forageapi.paymentmethod.RequestBody +import com.joinforage.forage.android.core.services.telemetry.Log import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.MediaType.Companion.toMediaTypeOrNull diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/VaultResponseParser.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/VaultResponseParser.kt index cde57cc38..e61f12ac7 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/VaultResponseParser.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/services/vault/VaultResponseParser.kt @@ -10,4 +10,4 @@ internal interface VaultResponseParser { val vaultErrorMsg: String? val rawResponse: String -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/Utils.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/Utils.kt index b09d7fbe9..0d5cf59da 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/Utils.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/Utils.kt @@ -1,7 +1,7 @@ package com.joinforage.forage.android.core.ui -import android.content.res.TypedArray import android.content.Context +import android.content.res.TypedArray import android.util.TypedValue internal fun getThemeAccentColor(context: Context): Int { @@ -33,4 +33,4 @@ internal fun TypedArray.getBoxCornerRadiusTopStart(boxCornerRadius: Float): Floa internal fun TypedArray.getBoxCornerRadius(styleIndex: Int, defaultBoxCornerRadius: Float): Float { val styledBoxCornerRadius = getDimension(styleIndex, 0f) return if (styledBoxCornerRadius == 0f) defaultBoxCornerRadius else styledBoxCornerRadius -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/VaultWrapper.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/VaultWrapper.kt index 9ddbb87ec..c63094451 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/VaultWrapper.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/VaultWrapper.kt @@ -7,8 +7,8 @@ import android.util.TypedValue import android.view.View import android.widget.FrameLayout import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.joinforage.forage.android.core.ui.element.SimpleElementListener import com.joinforage.forage.android.core.ui.element.StatefulElementListener @@ -43,7 +43,7 @@ internal abstract class VaultWrapper @JvmOverloads constructor( abstract fun getVaultSubmitter( foragePinElement: ForagePinElement, logger: Log - ) : AbstractVaultSubmitter + ): AbstractVaultSubmitter fun getThemeAccentColor(context: Context): Int { val outValue = TypedValue() diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePanElement.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePanElement.kt index a3141116b..d6e43f48d 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePanElement.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePanElement.kt @@ -291,4 +291,4 @@ abstract class ForagePanElement @JvmOverloads constructor( // remove format spacing return rawText.filter { it.isDigit() } } -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePinElement.kt b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePinElement.kt index 83e2f3ce5..73a1884de 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePinElement.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/core/ui/element/ForagePinElement.kt @@ -9,11 +9,11 @@ import android.widget.LinearLayout import com.joinforage.forage.android.R import com.joinforage.forage.android.core.ForageConfigNotSetException import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter +import com.joinforage.forage.android.core.ui.VaultWrapper import com.joinforage.forage.android.core.ui.element.state.PinElementState import com.joinforage.forage.android.core.ui.getLogoImageViewLayout -import com.joinforage.forage.android.core.ui.VaultWrapper /** * A [ForageElement] that securely collects a card PIN. You need a [ForagePINEditText] to call @@ -104,7 +104,7 @@ abstract class ForagePinElement @JvmOverloads constructor( } } - internal abstract fun determineBackingVault(forageConfig: ForageConfig, logger: Log) : VaultWrapper + internal abstract fun determineBackingVault(forageConfig: ForageConfig, logger: Log): VaultWrapper override fun initWithForageConfig(forageConfig: ForageConfig) { // Must initialize DD at the beginning of each render function. DD requires the context, @@ -130,7 +130,7 @@ abstract class ForagePinElement @JvmOverloads constructor( vault.clearText() } - internal fun getVaultSubmitter(logger: Log) : AbstractVaultSubmitter = + internal fun getVaultSubmitter(logger: Log): AbstractVaultSubmitter = vault.getVaultSubmitter(this, logger) // While the events that ForageElements expose mirrors the @@ -183,4 +183,4 @@ abstract class ForagePinElement @JvmOverloads constructor( override fun setBoxStrokeWidthFocused(boxStrokeWidth: Int) { // no-ops for now } -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/ForageSDK.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/ForageSDK.kt index 4b7f15522..0a91d0a97 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/ForageSDK.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/ForageSDK.kt @@ -7,25 +7,25 @@ import com.joinforage.forage.android.core.ForageConfigNotSetException import com.joinforage.forage.android.core.ForageSDKInterface import com.joinforage.forage.android.core.TokenizeEBTCardParams import com.joinforage.forage.android.core.services.EnvConfig -import com.joinforage.forage.android.core.ui.element.state.ElementState -import com.joinforage.forage.android.core.services.telemetry.CustomerPerceivedResponseMonitor -import com.joinforage.forage.android.core.services.telemetry.EventOutcome -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.OkHttpClientBuilder -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService +import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService import com.joinforage.forage.android.core.services.forageapi.polling.PollingService -import com.joinforage.forage.android.core.services.vault.TokenizeCardService +import com.joinforage.forage.android.core.services.telemetry.CustomerPerceivedResponseMonitor +import com.joinforage.forage.android.core.services.telemetry.EventOutcome +import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.vault.CapturePaymentRepository import com.joinforage.forage.android.core.services.vault.CheckBalanceRepository import com.joinforage.forage.android.core.services.vault.DeferPaymentCaptureRepository -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.vault.TokenizeCardService import com.joinforage.forage.android.core.ui.element.AbstractForageElement import com.joinforage.forage.android.core.ui.element.ForageConfig import com.joinforage.forage.android.core.ui.element.ForagePinElement +import com.joinforage.forage.android.core.ui.element.state.ElementState import com.joinforage.forage.android.ecom.ui.ForagePINEditText /** diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BTResponseParser.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BTResponseParser.kt index f3fb75d22..70ac14585 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BTResponseParser.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BTResponseParser.kt @@ -30,7 +30,7 @@ class BTResponseParser(btRes: Result) : VaultResponseParser { val resRegExp = BtResponseRegExp(vaultResponse) return try { // TODO: add DD metric to track frequency of proxy errors - if(resRegExp.containsProxyError) UnknownErrorApiResponse else null + if (resRegExp.containsProxyError) UnknownErrorApiResponse else null } catch (_: Exception) { null } @@ -52,11 +52,12 @@ class BTResponseParser(btRes: Result) : VaultResponseParser { } private fun parseSuccessfulResponse(vaultResponse: Result): ForageApiResponse.Success? { - return if (!isSuccessful) null - else { + return if (!isSuccessful) { + null + } else { // note: Result.toString() wraps the actual response as // "Success()" ForageApiResponse.Success(vaultResponse.getOrNull().toString()) } } -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BaseResponseRegExp.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BaseResponseRegExp.kt index 82358a5a2..d3976efde 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BaseResponseRegExp.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BaseResponseRegExp.kt @@ -21,4 +21,4 @@ open class BaseResponseRegExp(res: Result) { statusCode = null } } -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BasisTheoryPinSubmitter.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BasisTheoryPinSubmitter.kt index 55f88093f..4681c8c27 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BasisTheoryPinSubmitter.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BasisTheoryPinSubmitter.kt @@ -5,13 +5,13 @@ import com.basistheory.android.service.BasisTheoryElements import com.basistheory.android.service.ProxyRequest import com.basistheory.android.view.TextElement import com.joinforage.forage.android.core.services.ForageConstants +import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod -import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.services.vault.StopgapGlobalState import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter +import com.joinforage.forage.android.core.services.vault.StopgapGlobalState import com.joinforage.forage.android.core.services.vault.VaultProxyRequest import com.joinforage.forage.android.core.services.vault.VaultSubmitterParams import com.joinforage.forage.android.core.ui.element.ForagePinElement @@ -26,7 +26,7 @@ internal class BasisTheoryPinSubmitter( ) : AbstractVaultSubmitter( context = context, foragePinEditText = foragePinEditText, - logger = logger, + logger = logger ) { override val vaultType: VaultType = VaultType.BT_VAULT_TYPE override fun parseEncryptionKey(keys: EncryptionKeys): String = keys.btAlias diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BtResponseRegExp.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BtResponseRegExp.kt index 95ecf4628..e70218bc0 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BtResponseRegExp.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/BtResponseRegExp.kt @@ -6,4 +6,4 @@ class BtResponseRegExp(res: BasisTheoryResponse) : BaseResponseRegExp(res) { // so we parse the raw exception message to retrieve the body of the BasisTheory // errors val containsProxyError: Boolean = bodyText?.contains("proxy_error") ?: false -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/ProxyRequestObject.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/ProxyRequestObject.kt index 61b16af2a..2fc7f8b21 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/ProxyRequestObject.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/bt/ProxyRequestObject.kt @@ -6,4 +6,4 @@ import com.basistheory.android.view.TextElement * Body of the proxy request to Basis Theory * IMPORTANT: Any changes to the [ProxyRequestObject] must be reflected in the consumer-rules.pro file */ -internal data class ProxyRequestObject(val pin: TextElement, val card_number_token: String) \ No newline at end of file +internal data class ProxyRequestObject(val pin: TextElement, val card_number_token: String) diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VGSResponseParser.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VGSResponseParser.kt index 6c33c1490..8145e9825 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VGSResponseParser.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VGSResponseParser.kt @@ -29,10 +29,8 @@ class VGSResponseParser(vgsRes: VGSResponse?) : VaultResponseParser { forageError = parseForageError(vgsRes) successfulResponse = parseSuccessfulResponse(vgsRes) } - } - private fun parseVaultError(res: VGSResponse): ForageApiResponse.Failure? { if (res is VGSResponse.SuccessResponse) return null @@ -73,4 +71,4 @@ class VGSResponseParser(vgsRes: VGSResponse?) : VaultResponseParser { ForageApiResponse.Success(res.body.toString()) } } -} \ No newline at end of file +} diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VgsPinSubmitter.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VgsPinSubmitter.kt index 1b8a5f034..1589e7d75 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VgsPinSubmitter.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/services/vault/vgs/VgsPinSubmitter.kt @@ -2,17 +2,17 @@ package com.joinforage.forage.android.ecom.services.vault.vgs import android.content.Context import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.services.vault.StopgapGlobalState -import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod import com.joinforage.forage.android.core.services.forageapi.network.ForageApiError import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.UnknownErrorApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod +import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter -import com.joinforage.forage.android.core.ui.element.ForagePinElement +import com.joinforage.forage.android.core.services.vault.StopgapGlobalState import com.joinforage.forage.android.core.services.vault.VaultProxyRequest +import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.verygoodsecurity.vgscollect.VGSCollectLogger import com.verygoodsecurity.vgscollect.core.HTTPMethod import com.verygoodsecurity.vgscollect.core.VGSCollect @@ -23,7 +23,6 @@ import com.verygoodsecurity.vgscollect.widget.VGSEditText import org.json.JSONException import kotlin.coroutines.suspendCoroutine - internal class VgsPinSubmitter( context: Context, foragePinEditText: ForagePinElement, @@ -32,7 +31,7 @@ internal class VgsPinSubmitter( ) : AbstractVaultSubmitter( context = context, foragePinEditText = foragePinEditText, - logger = logger, + logger = logger ) { override val vaultType: VaultType = VaultType.VGS_VAULT_TYPE override suspend fun submitProxyRequest( diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePANEditText.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePANEditText.kt index 752e4aa3b..23d462875 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePANEditText.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePANEditText.kt @@ -16,4 +16,4 @@ class ForagePANEditText @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.foragePanEditTextStyle -) : ForagePanElement(context, attrs, defStyleAttr) \ No newline at end of file +) : ForagePanElement(context, attrs, defStyleAttr) diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt index aacce9292..5b50c588c 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt @@ -4,15 +4,15 @@ import android.app.Application import android.content.Context import android.graphics.Typeface import android.util.AttributeSet -import com.joinforage.forage.android.core.services.launchdarkly.LDManager import com.joinforage.forage.android.R -import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.EnvConfig -import com.joinforage.forage.android.core.ui.element.ForageConfig +import com.joinforage.forage.android.core.services.VaultType +import com.joinforage.forage.android.core.services.launchdarkly.LDManager import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.ui.VaultWrapper +import com.joinforage.forage.android.core.ui.element.ForageConfig import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.joinforage.forage.android.ecom.ui.vault.bt.BTVaultWrapper -import com.joinforage.forage.android.core.ui.VaultWrapper import com.joinforage.forage.android.ecom.ui.vault.vgs.VGSVaultWrapper import com.launchdarkly.sdk.android.LDConfig @@ -83,7 +83,7 @@ class ForagePINEditText @JvmOverloads constructor( } } - override fun determineBackingVault(forageConfig: ForageConfig, logger: Log) : VaultWrapper { + override fun determineBackingVault(forageConfig: ForageConfig, logger: Log): VaultWrapper { // initialize Launch Darkly singleton val ldMobileKey = EnvConfig.fromForageConfig(forageConfig).ldMobileKey val ldConfig = LDConfig.Builder().mobileKey(ldMobileKey).build() diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/bt/BTVaultWrapper.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/bt/BTVaultWrapper.kt index 1a2b20905..f161936a8 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/bt/BTVaultWrapper.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/bt/BTVaultWrapper.kt @@ -11,16 +11,16 @@ import android.widget.LinearLayout import com.basistheory.android.view.TextElement import com.basistheory.android.view.mask.ElementMask import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter +import com.joinforage.forage.android.core.ui.VaultWrapper +import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.joinforage.forage.android.core.ui.element.state.PinElementStateManager import com.joinforage.forage.android.core.ui.getBoxCornerRadiusBottomEnd import com.joinforage.forage.android.core.ui.getBoxCornerRadiusBottomStart import com.joinforage.forage.android.core.ui.getBoxCornerRadiusTopEnd import com.joinforage.forage.android.core.ui.getBoxCornerRadiusTopStart import com.joinforage.forage.android.ecom.services.vault.bt.BasisTheoryPinSubmitter -import com.joinforage.forage.android.core.ui.VaultWrapper -import com.joinforage.forage.android.core.ui.element.ForagePinElement internal class BTVaultWrapper @JvmOverloads constructor( context: Context, diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/vgs/VGSVaultWrapper.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/vgs/VGSVaultWrapper.kt index 4552c9591..66cfddd8c 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/vgs/VGSVaultWrapper.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/vault/vgs/VGSVaultWrapper.kt @@ -9,18 +9,18 @@ import android.util.TypedValue import android.view.Gravity import android.view.ViewGroup import android.widget.LinearLayout -import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.ui.element.state.PinElementStateManager import com.joinforage.forage.android.core.services.ForageConstants -import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter +import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter +import com.joinforage.forage.android.core.ui.VaultWrapper +import com.joinforage.forage.android.core.ui.element.ForagePinElement +import com.joinforage.forage.android.core.ui.element.state.PinElementStateManager import com.joinforage.forage.android.core.ui.getBoxCornerRadiusBottomEnd import com.joinforage.forage.android.core.ui.getBoxCornerRadiusBottomStart import com.joinforage.forage.android.core.ui.getBoxCornerRadiusTopEnd import com.joinforage.forage.android.core.ui.getBoxCornerRadiusTopStart import com.joinforage.forage.android.ecom.services.vault.vgs.VgsPinSubmitter -import com.joinforage.forage.android.core.ui.VaultWrapper -import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.verygoodsecurity.vgscollect.core.model.state.FieldState import com.verygoodsecurity.vgscollect.core.storage.OnFieldStateChangeListener import com.verygoodsecurity.vgscollect.view.card.validation.rules.VGSInfoRule diff --git a/forage-android/src/test/java/com/joinforage/forage/android/core/element/state/PanElementStateManagerTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/core/element/state/PanElementStateManagerTest.kt index 73dcfdd5d..472543f14 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/core/element/state/PanElementStateManagerTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/core/element/state/PanElementStateManagerTest.kt @@ -4,10 +4,10 @@ import com.joinforage.forage.android.core.ui.element.IncompleteEbtPanError import com.joinforage.forage.android.core.ui.element.InvalidEbtPanError import com.joinforage.forage.android.core.ui.element.StatefulElementListener import com.joinforage.forage.android.core.ui.element.TooLongEbtPanError -import com.joinforage.forage.android.core.ui.element.state.USState import com.joinforage.forage.android.core.ui.element.state.DerivedCardInfoDto import com.joinforage.forage.android.core.ui.element.state.PanElementState import com.joinforage.forage.android.core.ui.element.state.PanElementStateManager +import com.joinforage.forage.android.core.ui.element.state.USState import com.joinforage.forage.android.core.ui.element.state.WhitelistedCards import org.assertj.core.api.Assertions.assertThat import org.junit.Test diff --git a/forage-android/src/test/java/com/joinforage/forage/android/fixtures/CreatePaymentMethodFixtures.kt b/forage-android/src/test/java/com/joinforage/forage/android/fixtures/CreatePaymentMethodFixtures.kt index 9c510f517..3e4bdcaf5 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/fixtures/CreatePaymentMethodFixtures.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/fixtures/CreatePaymentMethodFixtures.kt @@ -34,7 +34,6 @@ internal fun MockWebServer.givenPaymentMethod(cardNumber: String, reusable: Bool } ) - internal fun PotentialRequestChain.returnsPaymentMethodSuccessfully() = thenRespond( success( jsonBody = fileBody( diff --git a/forage-android/src/test/java/com/joinforage/forage/android/mock/MockServiceFactory.kt b/forage-android/src/test/java/com/joinforage/forage/android/mock/MockServiceFactory.kt index da195a310..b1d3eaea6 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/mock/MockServiceFactory.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/mock/MockServiceFactory.kt @@ -1,22 +1,22 @@ package com.joinforage.forage.android.mock -import com.joinforage.forage.android.ecom.services.ForageSDK -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.Balance import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.ui.element.state.USState -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance -import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService import com.joinforage.forage.android.core.services.forageapi.network.OkHttpClientBuilder -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService import com.joinforage.forage.android.core.services.forageapi.payment.PaymentService +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.Balance +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethodService +import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService import com.joinforage.forage.android.core.services.forageapi.polling.PollingService -import com.joinforage.forage.android.core.services.vault.TokenizeCardService +import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.core.services.vault.BaseVaultRequestParams import com.joinforage.forage.android.core.services.vault.CapturePaymentRepository import com.joinforage.forage.android.core.services.vault.CheckBalanceRepository import com.joinforage.forage.android.core.services.vault.DeferPaymentCaptureRepository +import com.joinforage.forage.android.core.services.vault.TokenizeCardService import com.joinforage.forage.android.core.ui.element.ForagePinElement +import com.joinforage.forage.android.core.ui.element.state.USState +import com.joinforage.forage.android.ecom.services.ForageSDK import okhttp3.mockwebserver.MockWebServer internal class MockServiceFactory( @@ -50,7 +50,6 @@ internal class MockServiceFactory( cardNumberToken = "tok_sandbox_sYiPe9Q249qQ5wQyUPP5f7", encryptionKey = "tok_sandbox_eZeWfkq1AkqYdiAJC8iweE" ) - } private val okHttpClient by lazy { diff --git a/forage-android/src/test/java/com/joinforage/forage/android/model/PaymentModelTests.kt b/forage-android/src/test/java/com/joinforage/forage/android/model/PaymentModelTests.kt index a254a3b54..a191d1891 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/model/PaymentModelTests.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/model/PaymentModelTests.kt @@ -1,10 +1,10 @@ package com.joinforage.forage.android.model -import com.joinforage.forage.android.mock.MockServiceFactory import com.joinforage.forage.android.core.services.forageapi.payment.Address -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance import com.joinforage.forage.android.core.services.forageapi.payment.Payment import com.joinforage.forage.android.core.services.forageapi.payment.Receipt +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance +import com.joinforage.forage.android.mock.MockServiceFactory import junit.framework.TestCase.assertEquals import junit.framework.TestCase.assertNull import org.json.JSONArray diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/EncryptionKeyServiceTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/EncryptionKeyServiceTest.kt index 6c0624784..7d7e7af91 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/EncryptionKeyServiceTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/EncryptionKeyServiceTest.kt @@ -1,13 +1,13 @@ package com.joinforage.forage.android.network +import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService +import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.OkHttpClientBuilder import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.fixtures.givenEncryptionKey import com.joinforage.forage.android.fixtures.returnsEncryptionKeySuccessfully import com.joinforage.forage.android.fixtures.returnsUnauthorizedEncryptionKey -import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys -import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeyService -import com.joinforage.forage.android.core.services.forageapi.network.OkHttpClientBuilder -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.Method diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/MessageStatusServiceTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/MessageStatusServiceTest.kt index 1f3c4411c..c1f0acfae 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/MessageStatusServiceTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/MessageStatusServiceTest.kt @@ -1,14 +1,14 @@ package com.joinforage.forage.android.network -import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.forageapi.network.OkHttpClientBuilder +import com.joinforage.forage.android.core.services.forageapi.polling.Message +import com.joinforage.forage.android.core.services.forageapi.polling.MessageStatusService import com.joinforage.forage.android.core.services.telemetry.Log import com.joinforage.forage.android.fixtures.givenContentId import com.joinforage.forage.android.fixtures.returnsMessageCompletedSuccessfully import com.joinforage.forage.android.fixtures.returnsUnauthorized -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageError -import com.joinforage.forage.android.core.services.forageapi.polling.Message import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.Method diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/TokenizeCardServiceTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/TokenizeCardServiceTest.kt index 2be80297d..d72ceb38e 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/TokenizeCardServiceTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/TokenizeCardServiceTest.kt @@ -1,6 +1,11 @@ package com.joinforage.forage.android.network +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.ForageError +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.TokenizeCardService import com.joinforage.forage.android.fixtures.givenPaymentMethod import com.joinforage.forage.android.fixtures.returnsMissingCustomerIdPaymentMethodSuccessfully import com.joinforage.forage.android.fixtures.returnsNonReusablePaymentMethodSuccessfully @@ -8,11 +13,6 @@ import com.joinforage.forage.android.fixtures.returnsPaymentMethodFailed import com.joinforage.forage.android.fixtures.returnsPaymentMethodSuccessfully import com.joinforage.forage.android.mock.MockServiceFactory import com.joinforage.forage.android.mock.MockVaultSubmitter -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageError -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod -import com.joinforage.forage.android.core.services.vault.TokenizeCardService import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.Method diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/data/CapturePaymentRepositoryTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/data/CapturePaymentRepositoryTest.kt index f00e8e5b5..d2b10e954 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/data/CapturePaymentRepositoryTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/data/CapturePaymentRepositoryTest.kt @@ -1,7 +1,11 @@ package com.joinforage.forage.android.network.data -import com.joinforage.forage.android.core.services.vault.CapturePaymentRepository +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.ForageError +import com.joinforage.forage.android.core.services.forageapi.payment.Payment import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.CapturePaymentRepository +import com.joinforage.forage.android.ecom.ui.ForagePINEditText import com.joinforage.forage.android.fixtures.givenContentId import com.joinforage.forage.android.fixtures.givenEncryptionKey import com.joinforage.forage.android.fixtures.givenPaymentMethodRef @@ -19,10 +23,6 @@ import com.joinforage.forage.android.fixtures.returnsUnauthorizedEncryptionKey import com.joinforage.forage.android.mock.MockServiceFactory import com.joinforage.forage.android.mock.MockVaultSubmitter import com.joinforage.forage.android.mock.getVaultMessageResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageError -import com.joinforage.forage.android.core.services.forageapi.payment.Payment -import com.joinforage.forage.android.ecom.ui.ForagePINEditText import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.internal.MockServerSuite import me.jorgecastillo.hiroaki.matchers.times diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/data/CheckBalanceRepositoryTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/data/CheckBalanceRepositoryTest.kt index 175df58dd..4638bce6f 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/data/CheckBalanceRepositoryTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/data/CheckBalanceRepositoryTest.kt @@ -1,7 +1,11 @@ package com.joinforage.forage.android.network.data -import com.joinforage.forage.android.core.services.vault.CheckBalanceRepository +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.ForageError +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.CheckBalanceRepository +import com.joinforage.forage.android.ecom.ui.ForagePINEditText import com.joinforage.forage.android.fixtures.givenContentId import com.joinforage.forage.android.fixtures.givenEncryptionKey import com.joinforage.forage.android.fixtures.givenPaymentMethodRef @@ -16,10 +20,6 @@ import com.joinforage.forage.android.fixtures.returnsUnauthorizedEncryptionKey import com.joinforage.forage.android.mock.MockServiceFactory import com.joinforage.forage.android.mock.MockVaultSubmitter import com.joinforage.forage.android.mock.getVaultMessageResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageError -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance -import com.joinforage.forage.android.ecom.ui.ForagePINEditText import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.internal.MockServerSuite import me.jorgecastillo.hiroaki.matchers.times diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/data/DeferPaymentCaptureRepositoryTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/data/DeferPaymentCaptureRepositoryTest.kt index 139da5e4f..24b24f571 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/data/DeferPaymentCaptureRepositoryTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/data/DeferPaymentCaptureRepositoryTest.kt @@ -1,7 +1,10 @@ package com.joinforage.forage.android.network.data -import com.joinforage.forage.android.core.services.vault.DeferPaymentCaptureRepository +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.network.ForageError import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.vault.DeferPaymentCaptureRepository +import com.joinforage.forage.android.ecom.ui.ForagePINEditText import com.joinforage.forage.android.fixtures.givenEncryptionKey import com.joinforage.forage.android.fixtures.givenPaymentMethodRef import com.joinforage.forage.android.fixtures.givenPaymentRef @@ -13,9 +16,6 @@ import com.joinforage.forage.android.fixtures.returnsPaymentMethod import com.joinforage.forage.android.fixtures.returnsUnauthorizedEncryptionKey import com.joinforage.forage.android.mock.MockServiceFactory import com.joinforage.forage.android.mock.MockVaultSubmitter -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.core.services.forageapi.network.ForageError -import com.joinforage.forage.android.ecom.ui.ForagePINEditText import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.internal.MockServerSuite import org.assertj.core.api.Assertions.assertThat diff --git a/forage-android/src/test/java/com/joinforage/forage/android/network/data/LaunchDarklyTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/network/data/LaunchDarklyTest.kt index 21473252a..c592a32b5 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/network/data/LaunchDarklyTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/network/data/LaunchDarklyTest.kt @@ -2,11 +2,11 @@ package com.joinforage.forage.android.network.data import android.app.Application import androidx.test.platform.app.InstrumentationRegistry +import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.launchdarkly.ALWAYS_BT_PERCENT import com.joinforage.forage.android.core.services.launchdarkly.ALWAYS_VGS_PERCENT import com.joinforage.forage.android.core.services.launchdarkly.LDFlags import com.joinforage.forage.android.core.services.launchdarkly.LDManager -import com.joinforage.forage.android.core.services.VaultType import com.joinforage.forage.android.core.services.launchdarkly.computeVaultType import com.launchdarkly.sdk.LDValue import com.launchdarkly.sdk.android.LDConfig @@ -56,9 +56,13 @@ class LaunchDarklyTest() { assertThat(original).isEqualTo(VaultType.VGS_VAULT_TYPE) // Set the test data to send all traffic to BT - td.update(td.flag(LDFlags.VAULT_PRIMARY_TRAFFIC_PERCENTAGE_FLAG).variations(LDValue.of( - ALWAYS_BT_PERCENT - ))) + td.update( + td.flag(LDFlags.VAULT_PRIMARY_TRAFFIC_PERCENTAGE_FLAG).variations( + LDValue.of( + ALWAYS_BT_PERCENT + ) + ) + ) // it should consume the flag and choose BT val postUpdate = LDManager.getVaultProvider() diff --git a/forage-android/src/test/java/com/joinforage/forage/android/vault/AbstractVaultSubmitterTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/vault/AbstractVaultSubmitterTest.kt index 37dadb661..a4ab51e01 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/vault/AbstractVaultSubmitterTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/vault/AbstractVaultSubmitterTest.kt @@ -2,19 +2,19 @@ package com.joinforage.forage.android.vault import android.content.Context import com.joinforage.forage.android.core.services.VaultType -import com.joinforage.forage.android.core.ui.element.state.INITIAL_PIN_ELEMENT_STATE -import com.joinforage.forage.android.core.services.telemetry.Log -import com.joinforage.forage.android.core.services.telemetry.UserAction -import com.joinforage.forage.android.mock.MockLogger import com.joinforage.forage.android.core.services.forageapi.encryptkey.EncryptionKeys -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.network.UnknownErrorApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod +import com.joinforage.forage.android.core.services.telemetry.Log +import com.joinforage.forage.android.core.services.telemetry.UserAction import com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter import com.joinforage.forage.android.core.services.vault.VaultProxyRequest import com.joinforage.forage.android.core.services.vault.VaultSubmitterParams +import com.joinforage.forage.android.core.ui.element.state.INITIAL_PIN_ELEMENT_STATE import com.joinforage.forage.android.ecom.ui.ForagePINEditText +import com.joinforage.forage.android.mock.MockLogger import kotlinx.coroutines.test.runTest import me.jorgecastillo.hiroaki.internal.MockServerSuite import org.assertj.core.api.Assertions.assertThat @@ -72,7 +72,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { abstractVaultSubmitter = ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) } @@ -93,7 +93,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val concreteSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override suspend fun submitProxyRequest( vaultProxyRequest: VaultProxyRequest @@ -112,7 +112,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val concreteVaultSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override suspend fun submitProxyRequest( vaultProxyRequest: VaultProxyRequest @@ -131,7 +131,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val concreteSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { // Mock missing token override fun getVaultToken(paymentMethod: PaymentMethod): String? { @@ -159,7 +159,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val basisTheorySubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override fun getVaultToken(paymentMethod: PaymentMethod): String? { return pickVaultTokenByIndex(paymentMethod, 1) @@ -169,7 +169,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val vgsSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override fun getVaultToken(paymentMethod: PaymentMethod): String? { return pickVaultTokenByIndex(paymentMethod, 0) @@ -188,7 +188,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val concreteVaultSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override suspend fun submitProxyRequest( vaultProxyRequest: VaultProxyRequest @@ -217,7 +217,7 @@ class AbstractVaultSubmitterTest : MockServerSuite() { val concreteVaultSubmitter = object : ConcreteVaultSubmitter( context = mockContext, foragePinEditText = mockForagePinEditText, - logger = mockLogger, + logger = mockLogger ) { override suspend fun submitProxyRequest( vaultProxyRequest: VaultProxyRequest @@ -253,17 +253,16 @@ class AbstractVaultSubmitterTest : MockServerSuite() { assertThat(attributes.getValue("log_type").toString()).isEqualTo("metric") assertThat(attributes.getValue("forage_error_code").toString()).isEqualTo("unknown_server_error") } - } internal open class ConcreteVaultSubmitter( context: Context, foragePinEditText: ForagePINEditText, - logger: Log, + logger: Log ) : AbstractVaultSubmitter( context = context, foragePinEditText = foragePinEditText, - logger = logger, + logger = logger ) { override val vaultType: VaultType = VaultType.VGS_VAULT_TYPE override fun parseEncryptionKey(encryptionKeys: EncryptionKeys): String { @@ -279,5 +278,4 @@ internal open class ConcreteVaultSubmitter( override fun getVaultToken(paymentMethod: PaymentMethod): String? { return "mock-vault-token" } - } diff --git a/forage-android/src/test/java/com/joinforage/forage/android/vault/BasisTheoryPinSubmitterTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/vault/BasisTheoryPinSubmitterTest.kt index 51641432c..5397c9d09 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/vault/BasisTheoryPinSubmitterTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/vault/BasisTheoryPinSubmitterTest.kt @@ -5,16 +5,16 @@ import com.basistheory.android.service.BasisTheoryElements import com.basistheory.android.service.ProxyApi import com.basistheory.android.service.ProxyRequest import com.basistheory.android.view.TextElement -import com.joinforage.forage.android.core.services.vault.StopgapGlobalState -import com.joinforage.forage.android.mock.MockLogger import com.joinforage.forage.android.core.services.ForageConstants import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse -import com.joinforage.forage.android.ecom.services.vault.bt.BasisTheoryResponse -import com.joinforage.forage.android.ecom.services.vault.bt.ProxyRequestObject +import com.joinforage.forage.android.core.services.vault.StopgapGlobalState import com.joinforage.forage.android.core.services.vault.VaultProxyRequest import com.joinforage.forage.android.core.ui.element.ForageConfig import com.joinforage.forage.android.ecom.services.vault.bt.BasisTheoryPinSubmitter +import com.joinforage.forage.android.ecom.services.vault.bt.BasisTheoryResponse +import com.joinforage.forage.android.ecom.services.vault.bt.ProxyRequestObject import com.joinforage.forage.android.ecom.ui.ForagePINEditText +import com.joinforage.forage.android.mock.MockLogger import junit.framework.TestCase.assertEquals import junit.framework.TestCase.assertTrue import kotlinx.coroutines.runBlocking diff --git a/forage-android/src/test/java/com/joinforage/forage/android/vault/VgsPinSubmitterTest.kt b/forage-android/src/test/java/com/joinforage/forage/android/vault/VgsPinSubmitterTest.kt index 4e357b5c9..9d880bbe8 100644 --- a/forage-android/src/test/java/com/joinforage/forage/android/vault/VgsPinSubmitterTest.kt +++ b/forage-android/src/test/java/com/joinforage/forage/android/vault/VgsPinSubmitterTest.kt @@ -1,12 +1,12 @@ package com.joinforage.forage.android.vault import android.content.Context -import com.joinforage.forage.android.mock.MockLogger import com.joinforage.forage.android.core.services.ForageConstants import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.vault.VaultProxyRequest import com.joinforage.forage.android.ecom.services.vault.vgs.VgsPinSubmitter import com.joinforage.forage.android.ecom.ui.ForagePINEditText +import com.joinforage.forage.android.mock.MockLogger import com.verygoodsecurity.vgscollect.core.HTTPMethod import com.verygoodsecurity.vgscollect.core.VGSCollect import com.verygoodsecurity.vgscollect.core.VgsCollectResponseListener diff --git a/sample-app/src/main/java/com/joinforage/android/example/MainActivity.kt b/sample-app/src/main/java/com/joinforage/android/example/MainActivity.kt index f5fad910c..9845fa0e6 100644 --- a/sample-app/src/main/java/com/joinforage/android/example/MainActivity.kt +++ b/sample-app/src/main/java/com/joinforage/android/example/MainActivity.kt @@ -30,7 +30,7 @@ class MainActivity : AppCompatActivity() { val appBarConfiguration = AppBarConfiguration( setOf( R.id.navigation_complete_flow, - R.id.navigation_catalog, + R.id.navigation_catalog ) ) setupActionBarWithNavController(navController, appBarConfiguration) diff --git a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceViewModel.kt b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceViewModel.kt index ff07ae222..c19fc9dd6 100644 --- a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceViewModel.kt +++ b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/balance/FlowBalanceViewModel.kt @@ -8,9 +8,9 @@ import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.joinforage.forage.android.core.CheckBalanceParams -import com.joinforage.forage.android.ecom.services.ForageSDK -import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtBalance +import com.joinforage.forage.android.ecom.services.ForageSDK import com.joinforage.forage.android.ecom.ui.ForagePINEditText import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.launch diff --git a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/payment/capture/FlowCapturePaymentViewModel.kt b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/payment/capture/FlowCapturePaymentViewModel.kt index 5f42bb15f..ce1ffb987 100644 --- a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/payment/capture/FlowCapturePaymentViewModel.kt +++ b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/payment/capture/FlowCapturePaymentViewModel.kt @@ -9,8 +9,8 @@ import com.joinforage.android.example.ui.base.BaseViewModel import com.joinforage.android.example.ui.complete.flow.payment.capture.model.FlowCapturePaymentUIState import com.joinforage.forage.android.core.CapturePaymentParams import com.joinforage.forage.android.core.DeferPaymentCaptureParams -import com.joinforage.forage.android.ecom.services.ForageSDK import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.ecom.services.ForageSDK import com.joinforage.forage.android.ecom.ui.ForagePINEditText import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.launch diff --git a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/tokenize/FlowTokenizeViewModel.kt b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/tokenize/FlowTokenizeViewModel.kt index 402eba0ea..21b1cbc01 100644 --- a/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/tokenize/FlowTokenizeViewModel.kt +++ b/sample-app/src/main/java/com/joinforage/android/example/ui/complete/flow/tokenize/FlowTokenizeViewModel.kt @@ -6,12 +6,12 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.joinforage.forage.android.ecom.services.ForageSDK +import com.joinforage.forage.android.core.TokenizeEBTCardParams +import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse import com.joinforage.forage.android.core.services.forageapi.paymentmethod.Card import com.joinforage.forage.android.core.services.forageapi.paymentmethod.EbtCard import com.joinforage.forage.android.core.services.forageapi.paymentmethod.PaymentMethod -import com.joinforage.forage.android.core.TokenizeEBTCardParams -import com.joinforage.forage.android.core.services.forageapi.network.ForageApiResponse +import com.joinforage.forage.android.ecom.services.ForageSDK import com.joinforage.forage.android.ecom.ui.ForagePANEditText import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.launch