AliPay supports all supported currencies
This commit is contained in:
parent
3847d1bd3a
commit
c3f7f194b0
2 changed files with 35 additions and 1 deletions
|
@ -31,7 +31,34 @@ import java.util.List;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public final class AliPayAccount extends PaymentAccount {
|
public final class AliPayAccount extends PaymentAccount {
|
||||||
|
|
||||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("CNY"));
|
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||||
|
new TraditionalCurrency("AED"),
|
||||||
|
new TraditionalCurrency("AUD"),
|
||||||
|
new TraditionalCurrency("CAD"),
|
||||||
|
new TraditionalCurrency("CHF"),
|
||||||
|
new TraditionalCurrency("CNY"),
|
||||||
|
new TraditionalCurrency("CZK"),
|
||||||
|
new TraditionalCurrency("DKK"),
|
||||||
|
new TraditionalCurrency("EUR"),
|
||||||
|
new TraditionalCurrency("GBP"),
|
||||||
|
new TraditionalCurrency("HKD"),
|
||||||
|
new TraditionalCurrency("IDR"),
|
||||||
|
new TraditionalCurrency("ILS"),
|
||||||
|
new TraditionalCurrency("JPY"),
|
||||||
|
new TraditionalCurrency("KRW"),
|
||||||
|
new TraditionalCurrency("LKR"),
|
||||||
|
new TraditionalCurrency("MUR"),
|
||||||
|
new TraditionalCurrency("MYR"),
|
||||||
|
new TraditionalCurrency("NOK"),
|
||||||
|
new TraditionalCurrency("NZD"),
|
||||||
|
new TraditionalCurrency("PHP"),
|
||||||
|
new TraditionalCurrency("RUB"),
|
||||||
|
new TraditionalCurrency("SEK"),
|
||||||
|
new TraditionalCurrency("SGD"),
|
||||||
|
new TraditionalCurrency("THB"),
|
||||||
|
new TraditionalCurrency("USD"),
|
||||||
|
new TraditionalCurrency("ZAR")
|
||||||
|
);
|
||||||
|
|
||||||
public AliPayAccount() {
|
public AliPayAccount() {
|
||||||
super(PaymentMethod.ALI_PAY);
|
super(PaymentMethod.ALI_PAY);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
import haveno.core.payment.validation.AliPayValidator;
|
import haveno.core.payment.validation.AliPayValidator;
|
||||||
import haveno.core.util.coin.CoinFormatter;
|
import haveno.core.util.coin.CoinFormatter;
|
||||||
import haveno.core.util.validation.InputValidator;
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
|
||||||
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
||||||
|
@ -44,6 +45,12 @@ public class AliPayForm extends GeneralAccountNumberForm {
|
||||||
this.aliPayAccount = (AliPayAccount) paymentAccount;
|
this.aliPayAccount = (AliPayAccount) paymentAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addTradeCurrency() {
|
||||||
|
addTradeCurrencyComboBox();
|
||||||
|
currencyComboBox.setItems(FXCollections.observableArrayList(aliPayAccount.getSupportedCurrencies()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void setAccountNumber(String newValue) {
|
void setAccountNumber(String newValue) {
|
||||||
aliPayAccount.setAccountNr(newValue);
|
aliPayAccount.setAccountNr(newValue);
|
||||||
|
|
Loading…
Reference in a new issue