IAP Resolve and synchronize payment method from subscription object.

This commit is contained in:
Alex Hart
2025-03-04 16:32:13 -04:00
committed by GitHub
parent d87ee495d3
commit be43f8ce88
9 changed files with 102 additions and 32 deletions

View File

@@ -210,7 +210,7 @@ class StripeRepository(
}
StripeIntentAccessor.ObjectType.SETUP_INTENT -> stripeApi.getSetupIntent(stripeIntentAccessor).let {
StatusAndPaymentMethodId(stripeIntentAccessor.intentId, it.status, it.paymentMethod)
StatusAndPaymentMethodId(stripeIntentAccessor.intentId, it.status, it.paymentMethodId)
}
}
}

View File

@@ -352,7 +352,7 @@ class DonateToSignalFragment :
R.string.DonateToSignalFragment__your_payment_is_still_being_processed_onetime
}
} else {
if (state.monthlyDonationState.activeSubscription?.paymentMethod == ActiveSubscription.PAYMENT_METHOD_SEPA_DEBIT) {
if (state.monthlyDonationState.activeSubscription?.paymentMethod == ActiveSubscription.PaymentMethod.SEPA_DEBIT) {
R.string.DonateToSignalFragment__bank_transfers_usually_take_1_business_day_to_process_monthly
} else if (state.monthlyDonationState.nonVerifiedMonthlyDonation != null) {
R.string.DonateToSignalFragment__your_ideal_payment_is_still_processing

View File

@@ -86,7 +86,7 @@ data class DonateToSignalState(
}
val isUpdateLongRunning: Boolean
get() = monthlyDonationState.activeSubscription?.paymentMethod == ActiveSubscription.PAYMENT_METHOD_SEPA_DEBIT
get() = monthlyDonationState.activeSubscription?.paymentMethod == ActiveSubscription.PaymentMethod.SEPA_DEBIT
data class OneTimeDonationState(
val badge: Badge? = null,