mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-23 14:24:14 -04:00
Merge 0950899795
into 32148e7440
This commit is contained in:
commit
19317abeef
42 changed files with 583 additions and 103 deletions
|
@ -40,7 +40,7 @@ public class GetPaymentMethodsTest extends MethodTest {
|
|||
.stream()
|
||||
.map(PaymentMethod::getId)
|
||||
.collect(Collectors.toList());
|
||||
assertTrue(paymentMethodIds.size() >= 20);
|
||||
assertTrue(paymentMethodIds.size() >= 55);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
|
|
|
@ -78,7 +78,42 @@ public final class PaymentAccountForm implements PersistablePayload {
|
|||
CASH_APP,
|
||||
PAYPAL,
|
||||
VENMO,
|
||||
PAYSAFE;
|
||||
PAYSAFE,
|
||||
HAL_CASH,
|
||||
MONEY_BEAM,
|
||||
SWISH,
|
||||
POPMONEY,
|
||||
US_POSTAL_MONEY_ORDER,
|
||||
INTERAC_E_TRANSFER,
|
||||
CASH_DEPOSIT,
|
||||
WESTERN_UNION,
|
||||
NATIONAL_BANK,
|
||||
SAME_BANK,
|
||||
SPECIFIC_BANKS,
|
||||
AMAZON_GIFT_CARD,
|
||||
PERFECT_MONEY,
|
||||
ADVANCED_CASH,
|
||||
PAYSERA,
|
||||
NEFT,
|
||||
RTGS,
|
||||
IMPS,
|
||||
UPI,
|
||||
PAYTM,
|
||||
NEQUI,
|
||||
BIZUM,
|
||||
PIX,
|
||||
CAPITUAL,
|
||||
CELPAY,
|
||||
MONESE,
|
||||
SATISPAY,
|
||||
TIKKIE,
|
||||
VERSE,
|
||||
ACH_TRANSFER,
|
||||
DOMESTIC_WIRE_TRANSFER,
|
||||
JAPAN_BANK,
|
||||
ALI_PAY,
|
||||
WECHAT_PAY,
|
||||
PROMPT_PAY;
|
||||
|
||||
public static PaymentAccountForm.FormId fromProto(protobuf.PaymentAccountForm.FormId formId) {
|
||||
return ProtoUtil.enumFromProto(PaymentAccountForm.FormId.class, formId.name());
|
||||
|
|
|
@ -100,7 +100,8 @@ public final class PaymentAccountFormField implements PersistablePayload {
|
|||
TRADE_CURRENCIES,
|
||||
USERNAME,
|
||||
EMAIL_OR_MOBILE_NR_OR_USERNAME,
|
||||
EMAIL_OR_MOBILE_NR_OR_CASHTAG;
|
||||
EMAIL_OR_MOBILE_NR_OR_CASHTAG,
|
||||
VIRTUAL_PAYMENT_ADDRESS;
|
||||
|
||||
public static PaymentAccountFormField.FieldId fromProto(protobuf.PaymentAccountFormField.FieldId fieldId) {
|
||||
return ProtoUtil.enumFromProto(PaymentAccountFormField.FieldId.class, fieldId.name());
|
||||
|
|
|
@ -32,6 +32,17 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class AchTransferAccount extends CountryBasedPaymentAccount implements SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_TYPE,
|
||||
PaymentAccountFormField.FieldId.HOLDER_ADDRESS,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public AchTransferAccount() {
|
||||
|
@ -79,6 +90,6 @@ public final class AchTransferAccount extends CountryBasedPaymentAccount impleme
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,13 +24,19 @@ import haveno.core.payment.payload.AdvancedCashAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class AdvancedCashAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("BRL"),
|
||||
new TraditionalCurrency("EUR"),
|
||||
|
@ -49,16 +55,14 @@ public final class AdvancedCashAccount extends PaymentAccount {
|
|||
return new AdvancedCashAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class AliPayAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("AED"),
|
||||
new TraditionalCurrency("AUD"),
|
||||
|
@ -77,7 +83,7 @@ public final class AliPayAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -25,13 +25,20 @@ import haveno.core.locale.TradeCurrency;
|
|||
import haveno.core.payment.payload.AmazonGiftCardAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public final class AmazonGiftCardAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.COUNTRY,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("AUD"),
|
||||
new TraditionalCurrency("CAD"),
|
||||
|
@ -59,13 +66,13 @@ public final class AmazonGiftCardAccount extends PaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public String getEmailOrMobileNr() {
|
||||
|
@ -89,7 +96,7 @@ public final class AmazonGiftCardAccount extends PaymentAccount {
|
|||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(@NotNull Country country) {
|
||||
public void setCountry(@NonNull Country country) {
|
||||
this.country = country;
|
||||
getAmazonGiftCardAccountPayload().setCountryCode(country.code);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class BizumAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("EUR"));
|
||||
|
||||
public BizumAccount() {
|
||||
|
@ -72,6 +78,6 @@ public final class BizumAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,13 +24,19 @@ import haveno.core.payment.payload.CapitualAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class CapitualAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("BRL"),
|
||||
new TraditionalCurrency("EUR"),
|
||||
|
@ -47,16 +53,14 @@ public final class CapitualAccount extends PaymentAccount {
|
|||
return new CapitualAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -30,6 +30,13 @@ import java.util.List;
|
|||
|
||||
public final class CashDepositAccount extends CountryBasedPaymentAccount implements SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_ID,
|
||||
PaymentAccountFormField.FieldId.REQUIREMENTS,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
|
||||
|
||||
public CashDepositAccount() {
|
||||
|
@ -48,7 +55,7 @@ public final class CashDepositAccount extends CountryBasedPaymentAccount impleme
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,13 +24,19 @@ import haveno.core.payment.payload.CelPayAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class CelPayAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
// https://github.com/bisq-network/growth/issues/231
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("AUD"),
|
||||
|
@ -73,12 +79,12 @@ public final class CelPayAccount extends PaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,16 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class DomesticWireTransferAccount extends CountryBasedPaymentAccount implements SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.HOLDER_ADDRESS,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public DomesticWireTransferAccount() {
|
||||
|
@ -79,6 +89,6 @@ public final class DomesticWireTransferAccount extends CountryBasedPaymentAccoun
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class HalCashAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("EUR"));
|
||||
|
||||
public HalCashAccount() {
|
||||
|
@ -50,7 +56,7 @@ public final class HalCashAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setMobileNr(String mobileNr) {
|
||||
|
|
|
@ -31,6 +31,14 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class ImpsAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("INR"));
|
||||
|
||||
public ImpsAccount() {
|
||||
|
@ -64,6 +72,6 @@ public final class ImpsAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,13 +24,22 @@ import haveno.core.payment.payload.InteracETransferAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class InteracETransferAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL,
|
||||
PaymentAccountFormField.FieldId.ANSWER,
|
||||
PaymentAccountFormField.FieldId.QUESTION,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("CAD"));
|
||||
|
||||
public InteracETransferAccount() {
|
||||
|
@ -44,13 +53,13 @@ public final class InteracETransferAccount extends PaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
|
|
|
@ -29,6 +29,18 @@ import java.util.List;
|
|||
|
||||
public final class JapanBankAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_CODE,
|
||||
PaymentAccountFormField.FieldId.BANK_BRANCH_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_BRANCH_CODE,
|
||||
PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE,
|
||||
PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("JPY"));
|
||||
|
||||
public JapanBankAccount() {
|
||||
|
@ -48,7 +60,7 @@ public final class JapanBankAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
// bank code
|
||||
|
|
|
@ -31,6 +31,13 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class MoneseAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
// https://github.com/bisq-network/growth/issues/227
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("EUR"),
|
||||
|
@ -85,6 +92,6 @@ public final class MoneseAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class MoneyBeamAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_ID,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("EUR"));
|
||||
|
||||
public MoneyBeamAccount() {
|
||||
|
@ -51,7 +57,7 @@ public final class MoneyBeamAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountId(String accountId) {
|
||||
|
|
|
@ -32,6 +32,20 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class NationalBankAccount extends CountryBasedPaymentAccount implements SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_ID,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_TYPE,
|
||||
PaymentAccountFormField.FieldId.HOLDER_TAX_ID,
|
||||
PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID,
|
||||
PaymentAccountFormField.FieldId.COUNTRY,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
|
||||
|
||||
public NationalBankAccount() {
|
||||
|
@ -50,7 +64,7 @@ public final class NationalBankAccount extends CountryBasedPaymentAccount implem
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,14 +17,26 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import haveno.core.api.model.PaymentAccountFormField;
|
||||
import haveno.core.payment.payload.NeftAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class NeftAccount extends IfscBasedAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public NeftAccount() {
|
||||
super(PaymentMethod.NEFT);
|
||||
}
|
||||
|
@ -34,6 +46,11 @@ public final class NeftAccount extends IfscBasedAccount {
|
|||
return new NeftAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public String getMessageForBuyer() {
|
||||
return "payment.neft.info.buyer";
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class NequiAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("COP"));
|
||||
|
||||
public NequiAccount() {
|
||||
|
@ -72,6 +78,6 @@ public final class NequiAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -435,17 +435,22 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
break;
|
||||
case ACCOUNT_TYPE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 100).validate(value));
|
||||
break;
|
||||
case ANSWER:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
case BANK_ACCOUNT_NAME:
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
break;
|
||||
case BANK_ACCOUNT_NUMBER:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 100).validate(value));
|
||||
break;
|
||||
case BANK_ACCOUNT_TYPE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 100).validate(value));
|
||||
break;
|
||||
case BANK_ADDRESS:
|
||||
processValidationResult(new LengthValidator(1, 100).validate(value));
|
||||
break;
|
||||
case INTERMEDIARY_ADDRESS:
|
||||
processValidationResult(new LengthValidator(1, 100).validate(value));
|
||||
break;
|
||||
|
@ -454,17 +459,22 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
break;
|
||||
case BANK_BRANCH_CODE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 11).validate(value));
|
||||
break;
|
||||
case BANK_BRANCH_NAME:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 11).validate(value));
|
||||
break;
|
||||
case BANK_CODE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(1, 11).validate(value));
|
||||
break;
|
||||
case BANK_COUNTRY_CODE:
|
||||
if (!CountryUtil.findCountryByCode(value).isPresent()) throw new IllegalArgumentException("Invalid country code: " + value);
|
||||
break;
|
||||
case BANK_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
case BANK_NAME:
|
||||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
break;
|
||||
case INTERMEDIARY_NAME:
|
||||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
break;
|
||||
|
@ -491,7 +501,8 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
processValidationResult(new BICValidator().validate(value));
|
||||
break;
|
||||
case BRANCH_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
break;
|
||||
case CITY:
|
||||
processValidationResult(new LengthValidator(2, 34).validate(value));
|
||||
break;
|
||||
|
@ -518,14 +529,16 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
case EXTRA_INFO:
|
||||
break;
|
||||
case HOLDER_ADDRESS:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new InputValidator().validate(value));
|
||||
break;
|
||||
case HOLDER_EMAIL:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
case HOLDER_NAME:
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
break;
|
||||
case HOLDER_TAX_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 50).validate(value));
|
||||
break;
|
||||
case IBAN:
|
||||
processValidationResult(new IBANValidator().validate(value));
|
||||
break;
|
||||
|
@ -535,23 +548,27 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
if (!CountryUtil.findCountryByCode(value).isPresent()) throw new IllegalArgumentException("Invalid country code: " + value);
|
||||
break;
|
||||
case MOBILE_NR:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
break;
|
||||
case NATIONAL_ACCOUNT_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 50).validate(value));
|
||||
break;
|
||||
case PAYID:
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
break;
|
||||
case PIX_KEY:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new InputValidator().validate(value));
|
||||
break;
|
||||
case POSTAL_ADDRESS:
|
||||
processValidationResult(new InputValidator().validate(value));
|
||||
break;
|
||||
case PROMPT_PAY_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new InputValidator().validate(value));
|
||||
break;
|
||||
case QUESTION:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
case REQUIREMENTS:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
processValidationResult(new LengthValidator(2, 100).validate(value));
|
||||
case SALT:
|
||||
if (!value.equals("")) throw new IllegalArgumentException("Salt must be empty");
|
||||
break;
|
||||
|
@ -623,9 +640,15 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setLabel(Res.get("payment.account.owner"));
|
||||
break;
|
||||
case ACCOUNT_TYPE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.type"));
|
||||
break;
|
||||
case ANSWER:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.answer"));
|
||||
field.setMinLength(2);
|
||||
field.setMaxLength(100);
|
||||
break;
|
||||
case BANK_ACCOUNT_NAME:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.owner"));
|
||||
|
@ -633,9 +656,13 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setMaxLength(100);
|
||||
break;
|
||||
case BANK_ACCOUNT_NUMBER:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.bank.number"));
|
||||
break;
|
||||
case BANK_ACCOUNT_TYPE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.bank.type"));
|
||||
break;
|
||||
case BANK_ADDRESS:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXTAREA);
|
||||
field.setLabel(Res.get("payment.swift.address.bank"));
|
||||
|
@ -649,15 +676,21 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setLabel(Res.get("payment.swift.swiftCode.bank"));
|
||||
break;
|
||||
case BANK_BRANCH_NAME:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.bank.branch.name"));
|
||||
break;
|
||||
case BANK_CODE:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.bank.code"));
|
||||
break;
|
||||
case BANK_COUNTRY_CODE:
|
||||
field.setComponent(PaymentAccountFormField.Component.SELECT_ONE);
|
||||
field.setLabel(Res.get("payment.bank.country"));
|
||||
break;
|
||||
case BANK_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.SELECT_ONE);
|
||||
field.setLabel(Res.get("payment.account.bank.id"));
|
||||
break;
|
||||
case BANK_NAME:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.swift.name.bank"));
|
||||
|
@ -691,7 +724,9 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setLabel("BIC");
|
||||
break;
|
||||
case BRANCH_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.branch.id"));
|
||||
break;
|
||||
case CITY:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.city"));
|
||||
|
@ -717,7 +752,9 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setLabel(Res.get("payment.shared.optionalExtra"));
|
||||
break;
|
||||
case HOLDER_ADDRESS:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXTAREA);
|
||||
field.setLabel(Res.get("payment.account.holder.address"));
|
||||
break;
|
||||
case HOLDER_EMAIL:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
case HOLDER_NAME:
|
||||
|
@ -727,7 +764,11 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setMaxLength(100);
|
||||
break;
|
||||
case HOLDER_TAX_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.holder.tax.id"));
|
||||
field.setMinLength(2);
|
||||
field.setMaxLength(50);
|
||||
break;
|
||||
case IBAN:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel("IBAN");
|
||||
|
@ -755,25 +796,45 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setLabel(Res.get("payment.swift.swiftCode.intermediary"));
|
||||
break;
|
||||
case MOBILE_NR:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.mobile"));
|
||||
field.setMinLength(3);
|
||||
field.setMaxLength(100);
|
||||
break;
|
||||
case NATIONAL_ACCOUNT_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.national.account.id"));
|
||||
field.setMinLength(2);
|
||||
field.setMaxLength(50);
|
||||
break;
|
||||
case PAYID:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.email.mobile"));
|
||||
break;
|
||||
case PIX_KEY:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel("payment.accountNr");
|
||||
break;
|
||||
case POSTAL_ADDRESS:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXTAREA);
|
||||
field.setLabel(Res.get("payment.postal.address"));
|
||||
break;
|
||||
case PROMPT_PAY_ID:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel("payment.accountNr");
|
||||
break;
|
||||
case QUESTION:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.question"));
|
||||
field.setMinLength(2);
|
||||
field.setMaxLength(100);
|
||||
break;
|
||||
case REQUIREMENTS:
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.account.question"));
|
||||
field.setMinLength(2);
|
||||
field.setMaxLength(100);
|
||||
break;
|
||||
case SALT:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel("Salt");
|
||||
|
@ -821,6 +882,10 @@ public abstract class PaymentAccount implements PersistablePayload {
|
|||
field.setMinLength(10);
|
||||
field.setMaxLength(150);
|
||||
break;
|
||||
case VIRTUAL_PAYMENT_ADDRESS:
|
||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||
field.setLabel(Res.get("payment.upi.virtualPaymentAddress"));
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Unhandled form field: " + field);
|
||||
}
|
||||
|
|
|
@ -24,13 +24,19 @@ import haveno.core.payment.payload.PaymentAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.PayseraAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PayseraAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
// https://github.com/bisq-network/growth/issues/233
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("AUD"),
|
||||
|
@ -76,13 +82,13 @@ public final class PayseraAccount extends PaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setEmail(String accountId) {
|
||||
|
|
|
@ -17,13 +17,24 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import haveno.core.api.model.PaymentAccountFormField;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.PaytmAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PaytmAccount extends IfscBasedAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public PaytmAccount() {
|
||||
super(PaymentMethod.PAYTM);
|
||||
}
|
||||
|
@ -33,6 +44,11 @@ public final class PaytmAccount extends IfscBasedAccount {
|
|||
return new PaytmAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setEmailOrMobileNr(String emailOrMobileNr) {
|
||||
((PaytmAccountPayload) paymentAccountPayload).setEmailOrMobileNr(emailOrMobileNr);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PerfectMoneyAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public PerfectMoneyAccount() {
|
||||
|
@ -50,7 +56,7 @@ public final class PerfectMoneyAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PixAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.PIX_KEY,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("BRL"));
|
||||
|
||||
public PixAccount() {
|
||||
|
@ -72,6 +78,6 @@ public final class PixAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,13 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PopmoneyAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_ID,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public PopmoneyAccount() {
|
||||
|
@ -51,7 +58,7 @@ public final class PopmoneyAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountId(String accountId) {
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class PromptPayAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.PROMPT_PAY_ID,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("THB"));
|
||||
|
||||
public PromptPayAccount() {
|
||||
|
@ -50,7 +56,7 @@ public final class PromptPayAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setPromptPayId(String promptPayId) {
|
||||
|
|
|
@ -17,14 +17,24 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import haveno.core.api.model.PaymentAccountFormField;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.RtgsAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class RtgsAccount extends IfscBasedAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public RtgsAccount() {
|
||||
super(PaymentMethod.RTGS);
|
||||
}
|
||||
|
@ -34,6 +44,11 @@ public final class RtgsAccount extends IfscBasedAccount {
|
|||
return new RtgsAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public String getMessageForBuyer() {
|
||||
return "payment.rtgs.info.buyer";
|
||||
}
|
||||
|
|
|
@ -32,6 +32,20 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class SameBankAccount extends CountryBasedPaymentAccount implements BankNameRestrictedBankAccount, SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_ID,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_TYPE,
|
||||
PaymentAccountFormField.FieldId.HOLDER_TAX_ID,
|
||||
PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID,
|
||||
PaymentAccountFormField.FieldId.COUNTRY,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
|
||||
|
||||
public SameBankAccount() {
|
||||
|
@ -50,7 +64,7 @@ public final class SameBankAccount extends CountryBasedPaymentAccount implements
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,6 +31,13 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class SatispayAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("EUR"));
|
||||
|
||||
public SatispayAccount() {
|
||||
|
@ -80,6 +87,6 @@ public final class SatispayAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,20 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class SpecificBanksAccount extends CountryBasedPaymentAccount implements BankNameRestrictedBankAccount, SameCountryRestrictedBankAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_NAME,
|
||||
PaymentAccountFormField.FieldId.BANK_ID,
|
||||
PaymentAccountFormField.FieldId.BRANCH_ID,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_TYPE,
|
||||
PaymentAccountFormField.FieldId.HOLDER_TAX_ID,
|
||||
PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID,
|
||||
PaymentAccountFormField.FieldId.COUNTRY,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
|
||||
|
||||
public SpecificBanksAccount() {
|
||||
|
@ -50,7 +64,7 @@ public final class SpecificBanksAccount extends CountryBasedPaymentAccount imple
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
// TODO change to List
|
||||
|
|
|
@ -31,6 +31,13 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class SwishAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.MOBILE_NR,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("SEK"));
|
||||
|
||||
public SwishAccount() {
|
||||
|
@ -50,7 +57,7 @@ public final class SwishAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setMobileNr(String mobileNr) {
|
||||
|
|
|
@ -24,13 +24,19 @@ import haveno.core.payment.payload.PaymentAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.TikkieAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class TikkieAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.IBAN,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("EUR"));
|
||||
|
||||
public TikkieAccount() {
|
||||
|
@ -68,12 +74,12 @@ public final class TikkieAccount extends CountryBasedPaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,13 +24,21 @@ import haveno.core.payment.payload.PaymentAccountPayload;
|
|||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.TransferwiseUsdAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class TransferwiseUsdAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL,
|
||||
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public TransferwiseUsdAccount() {
|
||||
|
@ -84,12 +92,12 @@ public final class TransferwiseUsdAccount extends CountryBasedPaymentAccount {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||
return SUPPORTED_CURRENCIES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,13 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class USPostalMoneyOrderAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.POSTAL_ADDRESS,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||
|
||||
public USPostalMoneyOrderAccount() {
|
||||
|
@ -50,7 +57,7 @@ public final class USPostalMoneyOrderAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setPostalAddress(String postalAddress) {
|
||||
|
|
|
@ -17,13 +17,24 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import haveno.core.api.model.PaymentAccountFormField;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.payment.payload.UpiAccountPayload;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class UpiAccount extends IfscBasedAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.VIRTUAL_PAYMENT_ADDRESS,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public UpiAccount() {
|
||||
super(PaymentMethod.UPI);
|
||||
}
|
||||
|
@ -33,6 +44,11 @@ public final class UpiAccount extends IfscBasedAccount {
|
|||
return new UpiAccountPayload(paymentMethod.getId(), id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setVirtualPaymentAddress(String virtualPaymentAddress) {
|
||||
((UpiAccountPayload) paymentAccountPayload).setVirtualPaymentAddress(virtualPaymentAddress);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class VerseAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
// https://github.com/bisq-network/growth/issues/223
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("DKK"),
|
||||
|
@ -79,6 +85,6 @@ public final class VerseAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ import java.util.List;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public final class WeChatPayAccount extends PaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||
new TraditionalCurrency("CNY"),
|
||||
new TraditionalCurrency("USD"),
|
||||
|
@ -54,7 +60,7 @@ public final class WeChatPayAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -29,6 +29,15 @@ import java.util.List;
|
|||
|
||||
public final class WesternUnionAccount extends CountryBasedPaymentAccount {
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.EMAIL,
|
||||
PaymentAccountFormField.FieldId.HOLDER_NAME,
|
||||
PaymentAccountFormField.FieldId.CITY,
|
||||
PaymentAccountFormField.FieldId.STATE,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
|
||||
|
||||
public WesternUnionAccount() {
|
||||
|
@ -47,7 +56,7 @@ public final class WesternUnionAccount extends CountryBasedPaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
|
|
|
@ -101,7 +101,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import lombok.NonNull;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
|
@ -369,7 +369,42 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
|||
CASH_APP_ID,
|
||||
PAYPAL_ID,
|
||||
VENMO_ID,
|
||||
PAYSAFE_ID);
|
||||
PAYSAFE_ID,
|
||||
HAL_CASH_ID,
|
||||
MONEY_BEAM_ID,
|
||||
SWISH_ID,
|
||||
POPMONEY_ID,
|
||||
US_POSTAL_MONEY_ORDER_ID,
|
||||
INTERAC_E_TRANSFER_ID,
|
||||
CASH_DEPOSIT_ID,
|
||||
WESTERN_UNION_ID,
|
||||
NATIONAL_BANK_ID,
|
||||
SAME_BANK_ID,
|
||||
SPECIFIC_BANKS_ID,
|
||||
AMAZON_GIFT_CARD_ID,
|
||||
PERFECT_MONEY_ID,
|
||||
ADVANCED_CASH_ID,
|
||||
PAYSERA_ID,
|
||||
NEFT_ID,
|
||||
RTGS_ID,
|
||||
IMPS_ID,
|
||||
UPI_ID,
|
||||
PAYTM_ID,
|
||||
NEQUI_ID,
|
||||
BIZUM_ID,
|
||||
PIX_ID,
|
||||
CAPITUAL_ID,
|
||||
CELPAY_ID,
|
||||
MONESE_ID,
|
||||
SATISPAY_ID,
|
||||
TIKKIE_ID,
|
||||
VERSE_ID,
|
||||
ACH_TRANSFER_ID,
|
||||
DOMESTIC_WIRE_TRANSFER_ID,
|
||||
JAPAN_BANK_ID,
|
||||
ALI_PAY_ID,
|
||||
WECHAT_PAY_ID,
|
||||
PROMPT_PAY_ID);
|
||||
return paymentMethods.stream().filter(paymentMethod -> paymentMethodIds.contains(paymentMethod.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
@ -530,7 +565,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
|||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull PaymentMethod other) {
|
||||
public int compareTo(@NonNull PaymentMethod other) {
|
||||
return Res.get(id).compareTo(Res.get(other.id));
|
||||
}
|
||||
|
||||
|
|
|
@ -1903,6 +1903,41 @@ message PaymentAccountForm {
|
|||
PAYPAL = 17;
|
||||
VENMO = 18;
|
||||
PAYSAFE = 19;
|
||||
HAL_CASH = 20;
|
||||
MONEY_BEAM = 21;
|
||||
SWISH = 22;
|
||||
POPMONEY = 23;
|
||||
US_POSTAL_MONEY_ORDER = 24;
|
||||
INTERAC_E_TRANSFER = 25;
|
||||
CASH_DEPOSIT = 26;
|
||||
WESTERN_UNION = 27;
|
||||
NATIONAL_BANK = 28;
|
||||
SAME_BANK = 29;
|
||||
SPECIFIC_BANKS = 30;
|
||||
AMAZON_GIFT_CARD = 31;
|
||||
PERFECT_MONEY = 32;
|
||||
ADVANCED_CASH = 33;
|
||||
PAYSERA = 34;
|
||||
NEFT = 35;
|
||||
RTGS = 36;
|
||||
IMPS = 37;
|
||||
UPI = 38;
|
||||
PAYTM = 39;
|
||||
NEQUI = 40;
|
||||
BIZUM = 41;
|
||||
PIX = 42;
|
||||
CAPITUAL = 43;
|
||||
CELPAY = 44;
|
||||
MONESE = 45;
|
||||
SATISPAY = 46;
|
||||
TIKKIE = 47;
|
||||
VERSE = 48;
|
||||
ACH_TRANSFER = 49;
|
||||
DOMESTIC_WIRE_TRANSFER = 50;
|
||||
JAPAN_BANK = 51;
|
||||
ALI_PAY = 52;
|
||||
WECHAT_PAY = 53;
|
||||
PROMPT_PAY = 54;
|
||||
}
|
||||
FormId id = 1;
|
||||
repeated PaymentAccountFormField fields = 2;
|
||||
|
@ -1970,6 +2005,7 @@ message PaymentAccountFormField {
|
|||
USERNAME = 57;
|
||||
EMAIL_OR_MOBILE_NR_OR_USERNAME = 58;
|
||||
EMAIL_OR_MOBILE_NR_OR_CASHTAG = 59;
|
||||
VIRTUAL_PAYMENT_ADDRESS = 60;
|
||||
}
|
||||
enum Component {
|
||||
TEXT = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue