diff --git a/WooCommerce/build.gradle b/WooCommerce/build.gradle index 71dc80c9291..6bca880c5a5 100644 --- a/WooCommerce/build.gradle +++ b/WooCommerce/build.gradle @@ -319,7 +319,6 @@ dependencies { implementation project(":libs:commons") implementation project(":libs:cardreader") - debugImplementation project(":libs:iap") implementation(libs.facebook.shimmer) implementation(libs.photoview) diff --git a/WooCommerce/src/debug/AndroidManifest.xml b/WooCommerce/src/debug/AndroidManifest.xml index a96d39261a2..42bb9847ebc 100644 --- a/WooCommerce/src/debug/AndroidManifest.xml +++ b/WooCommerce/src/debug/AndroidManifest.xml @@ -32,11 +32,6 @@ android:enabled="@bool/enable_leak_canary" android:exported="false" /> - - { - CreateAndConfirmOrderResponse.Success(response.orderId) - } - is MobilePayRestClient.CreateOrderResponse.Error -> { - when (response.type) { - MobilePayRestClient.CreateOrderErrorType.API_ERROR, - MobilePayRestClient.CreateOrderErrorType.AUTH_ERROR, - MobilePayRestClient.CreateOrderErrorType.GENERIC_ERROR, - MobilePayRestClient.CreateOrderErrorType.INVALID_RESPONSE -> - CreateAndConfirmOrderResponse.Server(response.message ?: "Reason is not provided") - MobilePayRestClient.CreateOrderErrorType.TIMEOUT, - MobilePayRestClient.CreateOrderErrorType.NETWORK_ERROR -> CreateAndConfirmOrderResponse.Network - } - } - } - } - } -} diff --git a/WooCommerce/src/debug/kotlin/com/woocommerce/android/iapshowcase/purchase/IAPShowcasePurchaseFragment.kt b/WooCommerce/src/debug/kotlin/com/woocommerce/android/iapshowcase/purchase/IAPShowcasePurchaseFragment.kt deleted file mode 100644 index 0d85420499f..00000000000 --- a/WooCommerce/src/debug/kotlin/com/woocommerce/android/iapshowcase/purchase/IAPShowcasePurchaseFragment.kt +++ /dev/null @@ -1,95 +0,0 @@ -package com.woocommerce.android.iapshowcase.purchase - -import android.os.Bundle -import android.util.Log -import android.view.View -import android.widget.Button -import android.widget.TextView -import android.widget.Toast -import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.widget.Toolbar -import androidx.core.view.isVisible -import androidx.fragment.app.Fragment -import androidx.fragment.app.viewModels -import androidx.lifecycle.ViewModel -import androidx.lifecycle.ViewModelProvider -import com.woocommerce.android.R -import com.woocommerce.android.iap.pub.IAPActivityWrapper -import com.woocommerce.android.iap.pub.IAPSitePurchasePlanFactory -import com.woocommerce.android.iap.pub.network.SandboxTestingConfig -import com.woocommerce.android.iapshowcase.IAPDebugLogWrapper -import com.woocommerce.android.iapshowcase.IapMobilePayApiProvider -import dagger.hilt.android.AndroidEntryPoint -import javax.inject.Inject - -@AndroidEntryPoint -class IAPShowcasePurchaseFragment : Fragment(R.layout.fragment_iap_showcase_purchase) { - @Inject - lateinit var mobilePayAPIProvider: IapMobilePayApiProvider - - @Inject - lateinit var debugLogWrapper: IAPDebugLogWrapper - - private val viewModel: IAPShowcasePurchaseViewModel by viewModels { - object : ViewModelProvider.Factory { - @Suppress("UNCHECKED_CAST") - override fun create(modelClass: Class): T { - return IAPShowcasePurchaseViewModel( - IAPSitePurchasePlanFactory.createIAPSitePurchasePlan( - this@IAPShowcasePurchaseFragment.requireActivity().application, - debugLogWrapper, - mobilePayAPIProvider::buildMobilePayAPI, - object : SandboxTestingConfig { - override val isDebug: Boolean - get() = true - override val iapTestingSandboxUrl: String - get() = "" - } - ) - ) as T - } - } - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - setupToolbar(view) - setupObservers(view) - - view.findViewById