diff --git a/CHANGELOG.md b/CHANGELOG.md index add720883c2..8b17f29b0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## XX.XX.XX - 20XX-XX-XX ### Payments -* [ADDED][9753](https://github.com/stripe/stripe-android/pull/9753) Added support for Crypto to API bindings and payment sheet. +* [ADDED][9753](https://github.com/stripe/stripe-android/pull/9753) Added support for Crypto to API bindings. * [CHANGED][9804](https://github.com/stripe/stripe-android/pull/9804) Changed the edit and remove saved payment method flow so that tapping 'Edit' displays an icon that leads to a new update payment method screen that displays payment method details for card (last 4 digits of card number, cvc and expiry date fields), US Bank account (name, email, last 4 digits of bank account), and SEPA debit (name, email, last 4 digits of IBAN). ### Identity diff --git a/payments-ui-core/res/drawable-night/stripe_ic_paymentsheet_pm_crypto.xml b/payments-ui-core/res/drawable-night/stripe_ic_paymentsheet_pm_crypto.xml deleted file mode 100644 index 8aecee752e6..00000000000 --- a/payments-ui-core/res/drawable-night/stripe_ic_paymentsheet_pm_crypto.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/payments-ui-core/res/drawable/stripe_ic_paymentsheet_pm_crypto.xml b/payments-ui-core/res/drawable/stripe_ic_paymentsheet_pm_crypto.xml deleted file mode 100644 index 8a4b32046fb..00000000000 --- a/payments-ui-core/res/drawable/stripe_ic_paymentsheet_pm_crypto.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/payments-ui-core/res/values/donottranslate.xml b/payments-ui-core/res/values/donottranslate.xml index ad3f6347dab..9debbe5c71e 100644 --- a/payments-ui-core/res/values/donottranslate.xml +++ b/payments-ui-core/res/values/donottranslate.xml @@ -25,7 +25,6 @@ Sunbit Billie Satispay - Crypto Alma MobilePay Zip diff --git a/payments-ui-core/src/main/resources/lpms.json b/payments-ui-core/src/main/resources/lpms.json index 2d90fd069e0..d2452f1252e 100644 --- a/payments-ui-core/src/main/resources/lpms.json +++ b/payments-ui-core/src/main/resources/lpms.json @@ -917,33 +917,6 @@ } } }, - { - "type": "crypto", - "async": false, - "selector_icon": { - "light_theme_png": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto@3x-94c06c199e78e6d9ff9290210912bd5e.png", - "light_theme_svg": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto-15fd4ffeafd1b13e40688c8a06d79ba4.svg", - "dark_theme_png": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto_dark@3x-8f7b0e91b45cb56de550af37d41aac1d.png", - "dark_theme_svg": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto_dark-f19bb5c5400c6cde94dd53b7f1ce7217.svg" - }, - "fields": [ - ], - "next_action_spec": { - "confirm_response_status_specs": { - "requires_action": { - "type": "redirect_to_url" - } - }, - "post_confirm_handling_pi_status_specs": { - "succeeded": { - "type": "finished" - }, - "requires_action": { - "type": "canceled" - } - } - } - }, { "type": "mobilepay", "async": false, diff --git a/paymentsheet-example/src/androidTest/java/com/stripe/android/lpm/TestCrypto.kt b/paymentsheet-example/src/androidTest/java/com/stripe/android/lpm/TestCrypto.kt deleted file mode 100644 index f6411df0995..00000000000 --- a/paymentsheet-example/src/androidTest/java/com/stripe/android/lpm/TestCrypto.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.stripe.android.lpm - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.stripe.android.BasePlaygroundTest -import com.stripe.android.model.PaymentMethod -import com.stripe.android.paymentsheet.example.playground.settings.Country -import com.stripe.android.paymentsheet.example.playground.settings.CountrySettingsDefinition -import com.stripe.android.paymentsheet.example.playground.settings.Currency -import com.stripe.android.paymentsheet.example.playground.settings.CurrencySettingsDefinition -import com.stripe.android.paymentsheet.example.playground.settings.SupportedPaymentMethodsSettingsDefinition -import com.stripe.android.test.core.TestParameters -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -internal class TestCrypto : BasePlaygroundTest() { - private val testParameters = TestParameters.create( - paymentMethodCode = "crypto", - ) { settings -> - settings[CountrySettingsDefinition] = Country.US - settings[CurrencySettingsDefinition] = Currency.USD - settings[SupportedPaymentMethodsSettingsDefinition] = listOf( - PaymentMethod.Type.Crypto - ).joinToString(",") - } - - @Test - fun testCrypto() { - testDriver.confirmCustom( - testParameters = testParameters, - ) - } -} diff --git a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodRegistry.kt b/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodRegistry.kt index ed1e22f7a08..60bf919105b 100644 --- a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodRegistry.kt +++ b/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodRegistry.kt @@ -13,7 +13,6 @@ import com.stripe.android.lpmfoundations.paymentmethod.definitions.BlikDefinitio import com.stripe.android.lpmfoundations.paymentmethod.definitions.BoletoDefinition import com.stripe.android.lpmfoundations.paymentmethod.definitions.CardDefinition import com.stripe.android.lpmfoundations.paymentmethod.definitions.CashAppPayDefinition -import com.stripe.android.lpmfoundations.paymentmethod.definitions.CryptoDefinition import com.stripe.android.lpmfoundations.paymentmethod.definitions.EpsDefinition import com.stripe.android.lpmfoundations.paymentmethod.definitions.FpxDefinition import com.stripe.android.lpmfoundations.paymentmethod.definitions.GiroPayDefinition @@ -55,7 +54,6 @@ internal object PaymentMethodRegistry { BoletoDefinition, CardDefinition, CashAppPayDefinition, - CryptoDefinition, EpsDefinition, FpxDefinition, GiroPayDefinition, diff --git a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/definitions/CryptoDefinition.kt b/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/definitions/CryptoDefinition.kt deleted file mode 100644 index fd5565ac24c..00000000000 --- a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/definitions/CryptoDefinition.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.stripe.android.lpmfoundations.paymentmethod.definitions - -import com.stripe.android.lpmfoundations.luxe.SupportedPaymentMethod -import com.stripe.android.lpmfoundations.paymentmethod.AddPaymentMethodRequirement -import com.stripe.android.lpmfoundations.paymentmethod.PaymentMethodDefinition -import com.stripe.android.lpmfoundations.paymentmethod.PaymentMethodMetadata -import com.stripe.android.lpmfoundations.paymentmethod.UiDefinitionFactory -import com.stripe.android.model.PaymentMethod -import com.stripe.android.ui.core.R -import com.stripe.android.ui.core.elements.SharedDataSpec - -internal object CryptoDefinition : PaymentMethodDefinition { - override val type: PaymentMethod.Type = PaymentMethod.Type.Crypto - - override val supportedAsSavedPaymentMethod: Boolean = false - - override fun requirementsToBeUsedAsNewPaymentMethod( - hasIntentToSetup: Boolean - ): Set = setOf( - AddPaymentMethodRequirement.UnsupportedForSetup, - ) - - override fun requiresMandate(metadata: PaymentMethodMetadata): Boolean = false - - override fun uiDefinitionFactory(): UiDefinitionFactory = CryptoUiDefinitionFactory -} - -private object CryptoUiDefinitionFactory : UiDefinitionFactory.RequiresSharedDataSpec { - override fun createSupportedPaymentMethod(sharedDataSpec: SharedDataSpec) = SupportedPaymentMethod( - paymentMethodDefinition = CryptoDefinition, - sharedDataSpec = sharedDataSpec, - displayNameResource = R.string.stripe_paymentsheet_payment_method_crypto, - iconResource = R.drawable.stripe_ic_paymentsheet_pm_crypto, - ) -}