mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 00:28:02 +01:00
Support iDEAL
This commit is contained in:
@@ -190,10 +190,10 @@ public class SubscriptionController {
|
||||
}));
|
||||
}
|
||||
|
||||
// This logic to exclude some iOS client versions from receiving SEPA_DEBIT
|
||||
// This logic to exclude some iOS client versions from receiving SEPA_DEBIT or IDEAL
|
||||
// as a supported payment method can be removed after 01-23-24.
|
||||
private boolean excludePaymentMethod(@Nullable final UserAgent userAgent, final PaymentMethod paymentMethod) {
|
||||
return paymentMethod == PaymentMethod.SEPA_DEBIT
|
||||
return (paymentMethod == PaymentMethod.SEPA_DEBIT || paymentMethod == PaymentMethod.IDEAL)
|
||||
&& userAgent != null
|
||||
&& userAgent.getPlatform() == ClientPlatform.IOS
|
||||
&& userAgent.getVersion().isLowerThanOrEqualTo(LAST_PROBLEMATIC_IOS_VERSION);
|
||||
@@ -392,7 +392,7 @@ public class SubscriptionController {
|
||||
|
||||
private SubscriptionProcessorManager getManagerForPaymentMethod(PaymentMethod paymentMethod) {
|
||||
return switch (paymentMethod) {
|
||||
case CARD, SEPA_DEBIT -> stripeManager;
|
||||
case CARD, SEPA_DEBIT, IDEAL -> stripeManager;
|
||||
case PAYPAL -> braintreeManager;
|
||||
case UNKNOWN -> throw new BadRequestException("Invalid payment method");
|
||||
};
|
||||
|
||||
@@ -19,4 +19,8 @@ public enum PaymentMethod {
|
||||
* A SEPA debit account
|
||||
*/
|
||||
SEPA_DEBIT,
|
||||
/**
|
||||
* An iDEAL account
|
||||
*/
|
||||
IDEAL,
|
||||
}
|
||||
|
||||
@@ -107,7 +107,9 @@ public class StripeManager implements SubscriptionProcessorManager {
|
||||
|
||||
@Override
|
||||
public boolean supportsPaymentMethod(PaymentMethod paymentMethod) {
|
||||
return paymentMethod == PaymentMethod.CARD || paymentMethod == PaymentMethod.SEPA_DEBIT;
|
||||
return paymentMethod == PaymentMethod.CARD
|
||||
|| paymentMethod == PaymentMethod.SEPA_DEBIT
|
||||
|| paymentMethod == PaymentMethod.IDEAL;
|
||||
}
|
||||
|
||||
private RequestOptions commonOptions() {
|
||||
|
||||
Reference in New Issue
Block a user