mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-21 19:48:29 +00:00
Disable SEPA Debit for gifts.
This commit is contained in:
committed by
Cody Henthorne
parent
bf37c09ba0
commit
65d26d753d
@@ -28,7 +28,7 @@ object InAppDonations {
|
||||
PaymentSourceType.PayPal -> isPayPalAvailableForDonateToSignalType(donateToSignalType)
|
||||
PaymentSourceType.Stripe.CreditCard -> isCreditCardAvailable()
|
||||
PaymentSourceType.Stripe.GooglePay -> isGooglePayAvailable()
|
||||
PaymentSourceType.Stripe.SEPADebit -> isSEPADebitAvailable()
|
||||
PaymentSourceType.Stripe.SEPADebit -> isSEPADebitAvailableForDonateToSignalType(donateToSignalType)
|
||||
PaymentSourceType.Unknown -> false
|
||||
}
|
||||
}
|
||||
@@ -67,4 +67,12 @@ object InAppDonations {
|
||||
fun isSEPADebitAvailable(): Boolean {
|
||||
return FeatureFlags.sepaDebitDonations()
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the user is in a region which supports SEPA Debit transfers, based off local phone number
|
||||
* and donation type.
|
||||
*/
|
||||
fun isSEPADebitAvailableForDonateToSignalType(donateToSignalType: DonateToSignalType): Boolean {
|
||||
return donateToSignalType != DonateToSignalType.GIFT && FeatureFlags.sepaDebitDonations()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user