mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
support paypal, cashapp, venmo
Co-authored-by: preland <89992615+preland@users.noreply.github.com>
This commit is contained in:
parent
26c32a8ff4
commit
fea804086b
51 changed files with 881 additions and 186 deletions
|
@ -676,7 +676,7 @@ public class CreatePaymentAccountTest extends AbstractPaymentAccountTest {
|
||||||
assertEquals(COMPLETED_FORM_MAP.get(PROPERTY_NAME_SELECTED_TRADE_CURRENCY),
|
assertEquals(COMPLETED_FORM_MAP.get(PROPERTY_NAME_SELECTED_TRADE_CURRENCY),
|
||||||
paymentAccount.getSelectedTradeCurrency().getCode());
|
paymentAccount.getSelectedTradeCurrency().getCode());
|
||||||
verifyCommonFormEntries(paymentAccount);
|
verifyCommonFormEntries(paymentAccount);
|
||||||
assertEquals(COMPLETED_FORM_MAP.get(PROPERTY_NAME_USERNAME), paymentAccount.getUserName());
|
assertEquals(COMPLETED_FORM_MAP.get(PROPERTY_NAME_USERNAME), paymentAccount.getUsername());
|
||||||
print(paymentAccount);
|
print(paymentAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,10 @@ public final class PaymentAccountForm implements PersistablePayload {
|
||||||
TRANSFERWISE,
|
TRANSFERWISE,
|
||||||
UPHOLD,
|
UPHOLD,
|
||||||
ZELLE,
|
ZELLE,
|
||||||
AUSTRALIA_PAYID;
|
AUSTRALIA_PAYID,
|
||||||
|
CASH_APP,
|
||||||
|
PAYPAL,
|
||||||
|
VENMO;
|
||||||
|
|
||||||
public static PaymentAccountForm.FormId fromProto(protobuf.PaymentAccountForm.FormId formId) {
|
public static PaymentAccountForm.FormId fromProto(protobuf.PaymentAccountForm.FormId formId) {
|
||||||
return ProtoUtil.enumFromProto(PaymentAccountForm.FormId.class, formId.name());
|
return ProtoUtil.enumFromProto(PaymentAccountForm.FormId.class, formId.name());
|
||||||
|
|
|
@ -98,7 +98,9 @@ public final class PaymentAccountFormField implements PersistablePayload {
|
||||||
SPECIAL_INSTRUCTIONS,
|
SPECIAL_INSTRUCTIONS,
|
||||||
STATE,
|
STATE,
|
||||||
TRADE_CURRENCIES,
|
TRADE_CURRENCIES,
|
||||||
USER_NAME;
|
USERNAME,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_USERNAME,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_CASHTAG;
|
||||||
|
|
||||||
public static PaymentAccountFormField.FieldId fromProto(protobuf.PaymentAccountFormField.FieldId fieldId) {
|
public static PaymentAccountFormField.FieldId fromProto(protobuf.PaymentAccountFormField.FieldId fieldId) {
|
||||||
return ProtoUtil.enumFromProto(PaymentAccountFormField.FieldId.class, fieldId.name());
|
return ProtoUtil.enumFromProto(PaymentAccountFormField.FieldId.class, fieldId.name());
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class DomainInitialisation {
|
||||||
revolutAccountsUpdateHandler.accept(user.getPaymentAccountsAsObservable().stream()
|
revolutAccountsUpdateHandler.accept(user.getPaymentAccountsAsObservable().stream()
|
||||||
.filter(paymentAccount -> paymentAccount instanceof RevolutAccount)
|
.filter(paymentAccount -> paymentAccount instanceof RevolutAccount)
|
||||||
.map(paymentAccount -> (RevolutAccount) paymentAccount)
|
.map(paymentAccount -> (RevolutAccount) paymentAccount)
|
||||||
.filter(RevolutAccount::userNameNotSet)
|
.filter(RevolutAccount::usernameNotSet)
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
if (amazonGiftCardAccountsUpdateHandler != null && user.getPaymentAccountsAsObservable() != null) {
|
if (amazonGiftCardAccountsUpdateHandler != null && user.getPaymentAccountsAsObservable() != null) {
|
||||||
|
|
|
@ -28,17 +28,22 @@ import lombok.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
// Removed due too high chargeback risk
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
@Deprecated
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public final class CashAppAccount extends PaymentAccount {
|
public final class CashAppAccount extends PaymentAccount {
|
||||||
|
|
||||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||||
|
new TraditionalCurrency("USD"),
|
||||||
|
new TraditionalCurrency("GBP"));
|
||||||
|
|
||||||
|
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||||
|
PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_CASHTAG,
|
||||||
|
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
||||||
|
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||||
|
PaymentAccountFormField.FieldId.SALT);
|
||||||
|
|
||||||
public CashAppAccount() {
|
public CashAppAccount() {
|
||||||
super(PaymentMethod.CASH_APP);
|
super(PaymentMethod.CASH_APP);
|
||||||
setSingleTradeCurrency(SUPPORTED_CURRENCIES.get(0));
|
tradeCurrencies.addAll(getSupportedCurrencies());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,14 +58,14 @@ public final class CashAppAccount extends PaymentAccount {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||||
throw new RuntimeException("Not implemented");
|
return INPUT_FIELD_IDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCashTag(String cashTag) {
|
public void setEmailOrMobileNrOrCashtag(String emailOrMobileNrOrCashtag) {
|
||||||
((CashAppAccountPayload) paymentAccountPayload).setCashTag(cashTag);
|
((CashAppAccountPayload) paymentAccountPayload).setEmailOrMobileNrOrCashtag(emailOrMobileNrOrCashtag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCashTag() {
|
public String getEmailOrMobileNrOrCashtag() {
|
||||||
return ((CashAppAccountPayload) paymentAccountPayload).getCashTag();
|
return ((CashAppAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrCashtag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
95
core/src/main/java/haveno/core/payment/PayPalAccount.java
Normal file
95
core/src/main/java/haveno/core/payment/PayPalAccount.java
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.core.payment;
|
||||||
|
|
||||||
|
import haveno.core.api.model.PaymentAccountFormField;
|
||||||
|
import haveno.core.locale.TraditionalCurrency;
|
||||||
|
import haveno.core.locale.TradeCurrency;
|
||||||
|
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
|
import haveno.core.payment.payload.PaymentMethod;
|
||||||
|
import haveno.core.payment.payload.PayPalAccountPayload;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NonNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public final class PayPalAccount extends PaymentAccount {
|
||||||
|
|
||||||
|
// https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/
|
||||||
|
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
|
||||||
|
new TraditionalCurrency("AUD"),
|
||||||
|
new TraditionalCurrency("BRL"),
|
||||||
|
new TraditionalCurrency("CAD"),
|
||||||
|
new TraditionalCurrency("CNY"),
|
||||||
|
new TraditionalCurrency("CZK"),
|
||||||
|
new TraditionalCurrency("DKK"),
|
||||||
|
new TraditionalCurrency("EUR"),
|
||||||
|
new TraditionalCurrency("HKD"),
|
||||||
|
new TraditionalCurrency("HUF"),
|
||||||
|
new TraditionalCurrency("ILS"),
|
||||||
|
new TraditionalCurrency("JPY"),
|
||||||
|
new TraditionalCurrency("MYR"),
|
||||||
|
new TraditionalCurrency("MXN"),
|
||||||
|
new TraditionalCurrency("TWD"),
|
||||||
|
new TraditionalCurrency("NZD"),
|
||||||
|
new TraditionalCurrency("NOK"),
|
||||||
|
new TraditionalCurrency("PHP"),
|
||||||
|
new TraditionalCurrency("PLN"),
|
||||||
|
new TraditionalCurrency("GBP"),
|
||||||
|
new TraditionalCurrency("SGD"),
|
||||||
|
new TraditionalCurrency("SEK"),
|
||||||
|
new TraditionalCurrency("CHF"),
|
||||||
|
new TraditionalCurrency("THB"),
|
||||||
|
new TraditionalCurrency("USD"));
|
||||||
|
|
||||||
|
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||||
|
PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME,
|
||||||
|
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
||||||
|
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||||
|
PaymentAccountFormField.FieldId.SALT);
|
||||||
|
|
||||||
|
public PayPalAccount() {
|
||||||
|
super(PaymentMethod.PAYPAL);
|
||||||
|
tradeCurrencies.addAll(SUPPORTED_CURRENCIES);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected PaymentAccountPayload createPayload() {
|
||||||
|
return new PayPalAccountPayload(paymentMethod.getId(), id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NonNull List<TradeCurrency> getSupportedCurrencies() {
|
||||||
|
return SUPPORTED_CURRENCIES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||||
|
return INPUT_FIELD_IDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmailOrMobileNrOrUsername(String emailOrMobileNrOrUsername) {
|
||||||
|
((PayPalAccountPayload) paymentAccountPayload)
|
||||||
|
.setEmailOrMobileNrOrUsername(emailOrMobileNrOrUsername);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmailOrMobileNrOrUsername() {
|
||||||
|
return ((PayPalAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername();
|
||||||
|
}
|
||||||
|
}
|
|
@ -552,7 +552,13 @@ public abstract class PaymentAccount implements PersistablePayload {
|
||||||
Optional<List<TradeCurrency>> tradeCurrencies = CurrencyUtil.getTradeCurrenciesInList(currencyCodes, getSupportedCurrencies());
|
Optional<List<TradeCurrency>> tradeCurrencies = CurrencyUtil.getTradeCurrenciesInList(currencyCodes, getSupportedCurrencies());
|
||||||
if (!tradeCurrencies.isPresent()) throw new IllegalArgumentException("No trade currencies were found in the " + getPaymentMethod().getDisplayString() + " account form");
|
if (!tradeCurrencies.isPresent()) throw new IllegalArgumentException("No trade currencies were found in the " + getPaymentMethod().getDisplayString() + " account form");
|
||||||
break;
|
break;
|
||||||
case USER_NAME:
|
case USERNAME:
|
||||||
|
processValidationResult(new LengthValidator(3, 100).validate(value));
|
||||||
|
break;
|
||||||
|
case EMAIL_OR_MOBILE_NR_OR_USERNAME:
|
||||||
|
processValidationResult(new LengthValidator(3, 100).validate(value));
|
||||||
|
break;
|
||||||
|
case EMAIL_OR_MOBILE_NR_OR_CASHTAG:
|
||||||
processValidationResult(new LengthValidator(3, 100).validate(value));
|
processValidationResult(new LengthValidator(3, 100).validate(value));
|
||||||
break;
|
break;
|
||||||
case ADDRESS:
|
case ADDRESS:
|
||||||
|
@ -768,9 +774,21 @@ public abstract class PaymentAccount implements PersistablePayload {
|
||||||
field.setSupportedCurrencies(getSupportedCurrencies());
|
field.setSupportedCurrencies(getSupportedCurrencies());
|
||||||
field.setValue(String.join(",", getSupportedCurrencies().stream().map(TradeCurrency::getCode).collect(Collectors.toList())));
|
field.setValue(String.join(",", getSupportedCurrencies().stream().map(TradeCurrency::getCode).collect(Collectors.toList())));
|
||||||
break;
|
break;
|
||||||
case USER_NAME:
|
case USERNAME:
|
||||||
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||||
field.setLabel(Res.get("payment.account.userName"));
|
field.setLabel(Res.get("payment.account.username"));
|
||||||
|
field.setMinLength(3);
|
||||||
|
field.setMaxLength(100);
|
||||||
|
break;
|
||||||
|
case EMAIL_OR_MOBILE_NR_OR_USERNAME:
|
||||||
|
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||||
|
field.setLabel(Res.get("payment.email.mobile.username"));
|
||||||
|
field.setMinLength(3);
|
||||||
|
field.setMaxLength(100);
|
||||||
|
break;
|
||||||
|
case EMAIL_OR_MOBILE_NR_OR_CASHTAG:
|
||||||
|
field.setComponent(PaymentAccountFormField.Component.TEXT);
|
||||||
|
field.setLabel(Res.get("payment.email.mobile.cashtag"));
|
||||||
field.setMinLength(3);
|
field.setMinLength(3);
|
||||||
field.setMaxLength(100);
|
field.setMaxLength(100);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -86,6 +86,8 @@ public class PaymentAccountFactory {
|
||||||
return new TransferwiseAccount();
|
return new TransferwiseAccount();
|
||||||
case PaymentMethod.TRANSFERWISE_USD_ID:
|
case PaymentMethod.TRANSFERWISE_USD_ID:
|
||||||
return new TransferwiseUsdAccount();
|
return new TransferwiseUsdAccount();
|
||||||
|
case PaymentMethod.PAYPAL_ID:
|
||||||
|
return new PayPalAccount();
|
||||||
case PaymentMethod.PAYSERA_ID:
|
case PaymentMethod.PAYSERA_ID:
|
||||||
return new PayseraAccount();
|
return new PayseraAccount();
|
||||||
case PaymentMethod.PAXUM_ID:
|
case PaymentMethod.PAXUM_ID:
|
||||||
|
|
|
@ -66,6 +66,7 @@ import static haveno.core.payment.payload.PaymentMethod.NATIONAL_BANK_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.NEFT_ID;
|
import static haveno.core.payment.payload.PaymentMethod.NEFT_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.NEQUI_ID;
|
import static haveno.core.payment.payload.PaymentMethod.NEQUI_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.PAXUM_ID;
|
import static haveno.core.payment.payload.PaymentMethod.PAXUM_ID;
|
||||||
|
import static haveno.core.payment.payload.PaymentMethod.PAYPAL_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.PAYSERA_ID;
|
import static haveno.core.payment.payload.PaymentMethod.PAYSERA_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.PAYTM_ID;
|
import static haveno.core.payment.payload.PaymentMethod.PAYTM_ID;
|
||||||
import static haveno.core.payment.payload.PaymentMethod.PERFECT_MONEY_ID;
|
import static haveno.core.payment.payload.PaymentMethod.PERFECT_MONEY_ID;
|
||||||
|
@ -214,6 +215,8 @@ public class PaymentAccountUtil {
|
||||||
return USPostalMoneyOrderAccount.SUPPORTED_CURRENCIES;
|
return USPostalMoneyOrderAccount.SUPPORTED_CURRENCIES;
|
||||||
case VENMO_ID:
|
case VENMO_ID:
|
||||||
return VenmoAccount.SUPPORTED_CURRENCIES;
|
return VenmoAccount.SUPPORTED_CURRENCIES;
|
||||||
|
case PAYPAL_ID:
|
||||||
|
return PayPalAccount.SUPPORTED_CURRENCIES;
|
||||||
case JAPAN_BANK_ID:
|
case JAPAN_BANK_ID:
|
||||||
return JapanBankAccount.SUPPORTED_CURRENCIES;
|
return JapanBankAccount.SUPPORTED_CURRENCIES;
|
||||||
case WECHAT_PAY_ID:
|
case WECHAT_PAY_ID:
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.List;
|
||||||
public final class RevolutAccount extends PaymentAccount {
|
public final class RevolutAccount extends PaymentAccount {
|
||||||
|
|
||||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||||
PaymentAccountFormField.FieldId.USER_NAME,
|
PaymentAccountFormField.FieldId.USERNAME,
|
||||||
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
||||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||||
PaymentAccountFormField.FieldId.SALT
|
PaymentAccountFormField.FieldId.SALT
|
||||||
|
@ -82,16 +82,16 @@ public final class RevolutAccount extends PaymentAccount {
|
||||||
return new RevolutAccountPayload(paymentMethod.getId(), id);
|
return new RevolutAccountPayload(paymentMethod.getId(), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserName(String userName) {
|
public void setUsername(String userame) {
|
||||||
revolutAccountPayload().setUserName(userName);
|
revolutAccountPayload().setUserName(userame);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserName() {
|
public String getUsername() {
|
||||||
return (revolutAccountPayload()).getUserName();
|
return (revolutAccountPayload()).getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean userNameNotSet() {
|
public boolean usernameNotSet() {
|
||||||
return (revolutAccountPayload()).userNameNotSet();
|
return (revolutAccountPayload()).usernameNotSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
private RevolutAccountPayload revolutAccountPayload() {
|
private RevolutAccountPayload revolutAccountPayload() {
|
||||||
|
|
|
@ -28,14 +28,16 @@ import lombok.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
// Removed due too high chargeback risk
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
@Deprecated
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public final class VenmoAccount extends PaymentAccount {
|
public final class VenmoAccount extends PaymentAccount {
|
||||||
|
|
||||||
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("USD"));
|
||||||
|
|
||||||
|
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||||
|
PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME,
|
||||||
|
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||||
|
PaymentAccountFormField.FieldId.SALT);
|
||||||
|
|
||||||
public VenmoAccount() {
|
public VenmoAccount() {
|
||||||
super(PaymentMethod.VENMO);
|
super(PaymentMethod.VENMO);
|
||||||
setSingleTradeCurrency(SUPPORTED_CURRENCIES.get(0));
|
setSingleTradeCurrency(SUPPORTED_CURRENCIES.get(0));
|
||||||
|
@ -53,22 +55,15 @@ public final class VenmoAccount extends PaymentAccount {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||||
throw new RuntimeException("Not implemented");
|
return INPUT_FIELD_IDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVenmoUserName(String venmoUserName) {
|
public void setNameOrUsernameOrEmailOrMobileNr(String usernameOrEmailOrMobileNr) {
|
||||||
((VenmoAccountPayload) paymentAccountPayload).setVenmoUserName(venmoUserName);
|
((VenmoAccountPayload) paymentAccountPayload)
|
||||||
|
.setEmailOrMobileNrOrUsername(usernameOrEmailOrMobileNr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getVenmoUserName() {
|
public String getNameOrUsernameOrEmailOrMobileNr() {
|
||||||
return ((VenmoAccountPayload) paymentAccountPayload).getVenmoUserName();
|
return ((VenmoAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername();
|
||||||
}
|
|
||||||
|
|
||||||
public void setHolderName(String holderName) {
|
|
||||||
((VenmoAccountPayload) paymentAccountPayload).setHolderName(holderName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHolderName() {
|
|
||||||
return ((VenmoAccountPayload) paymentAccountPayload).getHolderName();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,29 +29,25 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
// Removed due too high chargeback risk
|
|
||||||
@Deprecated
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString
|
@ToString
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public final class CashAppAccountPayload extends PaymentAccountPayload {
|
public final class CashAppAccountPayload extends PaymentAccountPayload {
|
||||||
private String cashTag = "";
|
private String emailOrMobileNrOrCashtag = "";
|
||||||
|
|
||||||
public CashAppAccountPayload(String paymentMethod, String id) {
|
public CashAppAccountPayload(String paymentMethod, String id) {
|
||||||
super(paymentMethod, id);
|
super(paymentMethod, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// PROTO BUFFER
|
// PROTO BUFFER
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private CashAppAccountPayload(String paymentMethod,
|
private CashAppAccountPayload(String paymentMethod,
|
||||||
String id,
|
String id,
|
||||||
String cashTag,
|
String emailOrMobileNrOrCashtag,
|
||||||
long maxTradePeriod,
|
long maxTradePeriod,
|
||||||
Map<String, String> excludeFromJsonDataMap) {
|
Map<String, String> excludeFromJsonDataMap) {
|
||||||
super(paymentMethod,
|
super(paymentMethod,
|
||||||
|
@ -59,21 +55,21 @@ public final class CashAppAccountPayload extends PaymentAccountPayload {
|
||||||
maxTradePeriod,
|
maxTradePeriod,
|
||||||
excludeFromJsonDataMap);
|
excludeFromJsonDataMap);
|
||||||
|
|
||||||
this.cashTag = cashTag;
|
this.emailOrMobileNrOrCashtag = emailOrMobileNrOrCashtag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Message toProtoMessage() {
|
public Message toProtoMessage() {
|
||||||
return getPaymentAccountPayloadBuilder()
|
return getPaymentAccountPayloadBuilder()
|
||||||
.setCashAppAccountPayload(protobuf.CashAppAccountPayload.newBuilder()
|
.setCashAppAccountPayload(protobuf.CashAppAccountPayload.newBuilder()
|
||||||
.setCashTag(cashTag))
|
.setEmailOrMobileNrOrCashtag(emailOrMobileNrOrCashtag))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CashAppAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
|
public static CashAppAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
|
||||||
return new CashAppAccountPayload(proto.getPaymentMethodId(),
|
return new CashAppAccountPayload(proto.getPaymentMethodId(),
|
||||||
proto.getId(),
|
proto.getId(),
|
||||||
proto.getCashAppAccountPayload().getCashTag(),
|
proto.getCashAppAccountPayload().getEmailOrMobileNrOrCashtag(),
|
||||||
proto.getMaxTradePeriod(),
|
proto.getMaxTradePeriod(),
|
||||||
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
||||||
}
|
}
|
||||||
|
@ -85,7 +81,7 @@ public final class CashAppAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account") + " " + cashTag;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.email.mobile.cashtag") + " " + emailOrMobileNrOrCashtag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -95,6 +91,6 @@ public final class CashAppAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getAgeWitnessInputData() {
|
public byte[] getAgeWitnessInputData() {
|
||||||
return super.getAgeWitnessInputData(cashTag.getBytes(StandardCharsets.UTF_8));
|
return super.getAgeWitnessInputData(emailOrMobileNrOrCashtag.getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ public final class MoneseAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.userName") + " " + holderName;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.username") + " " + holderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.core.payment.payload;
|
||||||
|
|
||||||
|
import com.google.protobuf.Message;
|
||||||
|
import haveno.core.locale.Res;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
@Slf4j
|
||||||
|
public final class PayPalAccountPayload extends PaymentAccountPayload {
|
||||||
|
private String emailOrMobileNrOrUsername = "";
|
||||||
|
|
||||||
|
public PayPalAccountPayload(String paymentMethod, String id) {
|
||||||
|
super(paymentMethod, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// PROTO BUFFER
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
private PayPalAccountPayload(String paymentMethod,
|
||||||
|
String id,
|
||||||
|
String emailOrMobileNrOrUsername,
|
||||||
|
long maxTradePeriod,
|
||||||
|
Map<String, String> excludeFromJsonDataMap) {
|
||||||
|
super(paymentMethod,
|
||||||
|
id,
|
||||||
|
maxTradePeriod,
|
||||||
|
excludeFromJsonDataMap);
|
||||||
|
|
||||||
|
this.emailOrMobileNrOrUsername = emailOrMobileNrOrUsername;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Message toProtoMessage() {
|
||||||
|
return getPaymentAccountPayloadBuilder()
|
||||||
|
.setPaypalAccountPayload(protobuf.PayPalAccountPayload.newBuilder()
|
||||||
|
.setEmailOrMobileNrOrUsername(emailOrMobileNrOrUsername))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PayPalAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
|
||||||
|
return new PayPalAccountPayload(proto.getPaymentMethodId(),
|
||||||
|
proto.getId(),
|
||||||
|
proto.getPaypalAccountPayload().getEmailOrMobileNrOrUsername(),
|
||||||
|
proto.getMaxTradePeriod(),
|
||||||
|
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// API
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPaymentDetails() {
|
||||||
|
return Res.getWithCol("payment.email.mobile.username") + " "
|
||||||
|
+ emailOrMobileNrOrUsername;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPaymentDetailsForTradePopup() {
|
||||||
|
return getPaymentDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte[] getAgeWitnessInputData() {
|
||||||
|
return super.getAgeWitnessInputData(emailOrMobileNrOrUsername.getBytes(StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,8 +47,10 @@ import haveno.core.payment.AmazonGiftCardAccount;
|
||||||
import haveno.core.payment.AustraliaPayidAccount;
|
import haveno.core.payment.AustraliaPayidAccount;
|
||||||
import haveno.core.payment.BizumAccount;
|
import haveno.core.payment.BizumAccount;
|
||||||
import haveno.core.payment.CapitualAccount;
|
import haveno.core.payment.CapitualAccount;
|
||||||
|
import haveno.core.payment.CashAppAccount;
|
||||||
import haveno.core.payment.CashAtAtmAccount;
|
import haveno.core.payment.CashAtAtmAccount;
|
||||||
import haveno.core.payment.PayByMailAccount;
|
import haveno.core.payment.PayByMailAccount;
|
||||||
|
import haveno.core.payment.PayPalAccount;
|
||||||
import haveno.core.payment.CashDepositAccount;
|
import haveno.core.payment.CashDepositAccount;
|
||||||
import haveno.core.payment.CelPayAccount;
|
import haveno.core.payment.CelPayAccount;
|
||||||
import haveno.core.payment.ZelleAccount;
|
import haveno.core.payment.ZelleAccount;
|
||||||
|
@ -89,6 +91,7 @@ import haveno.core.payment.TransferwiseUsdAccount;
|
||||||
import haveno.core.payment.USPostalMoneyOrderAccount;
|
import haveno.core.payment.USPostalMoneyOrderAccount;
|
||||||
import haveno.core.payment.UpholdAccount;
|
import haveno.core.payment.UpholdAccount;
|
||||||
import haveno.core.payment.UpiAccount;
|
import haveno.core.payment.UpiAccount;
|
||||||
|
import haveno.core.payment.VenmoAccount;
|
||||||
import haveno.core.payment.VerseAccount;
|
import haveno.core.payment.VerseAccount;
|
||||||
import haveno.core.payment.WeChatPayAccount;
|
import haveno.core.payment.WeChatPayAccount;
|
||||||
import haveno.core.payment.WesternUnionAccount;
|
import haveno.core.payment.WesternUnionAccount;
|
||||||
|
@ -190,14 +193,11 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
public static final String SWIFT_ID = "SWIFT";
|
public static final String SWIFT_ID = "SWIFT";
|
||||||
public static final String ACH_TRANSFER_ID = "ACH_TRANSFER";
|
public static final String ACH_TRANSFER_ID = "ACH_TRANSFER";
|
||||||
public static final String DOMESTIC_WIRE_TRANSFER_ID = "DOMESTIC_WIRE_TRANSFER";
|
public static final String DOMESTIC_WIRE_TRANSFER_ID = "DOMESTIC_WIRE_TRANSFER";
|
||||||
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String OK_PAY_ID = "OK_PAY";
|
public static final String OK_PAY_ID = "OK_PAY"; // Cannot be deleted as it would break old trade history entries
|
||||||
@Deprecated
|
public static final String CASH_APP_ID = "CASH_APP";
|
||||||
public static final String CASH_APP_ID = "CASH_APP"; // Removed due too high chargeback risk
|
public static final String VENMO_ID = "VENMO";
|
||||||
@Deprecated
|
public static final String PAYPAL_ID = "PAYPAL";
|
||||||
public static final String VENMO_ID = "VENMO"; // Removed due too high chargeback risk
|
|
||||||
|
|
||||||
public static PaymentMethod UPHOLD;
|
public static PaymentMethod UPHOLD;
|
||||||
public static PaymentMethod MONEY_BEAM;
|
public static PaymentMethod MONEY_BEAM;
|
||||||
|
@ -254,14 +254,13 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
public static PaymentMethod ACH_TRANSFER;
|
public static PaymentMethod ACH_TRANSFER;
|
||||||
public static PaymentMethod DOMESTIC_WIRE_TRANSFER;
|
public static PaymentMethod DOMESTIC_WIRE_TRANSFER;
|
||||||
public static PaymentMethod BSQ_SWAP;
|
public static PaymentMethod BSQ_SWAP;
|
||||||
|
public static PaymentMethod PAYPAL;
|
||||||
|
public static PaymentMethod CASH_APP;
|
||||||
|
public static PaymentMethod VENMO;
|
||||||
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
// Cannot be deleted as it would break old trade history entries
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static PaymentMethod OK_PAY = getDummyPaymentMethod(OK_PAY_ID);
|
public static PaymentMethod OK_PAY = getDummyPaymentMethod(OK_PAY_ID);
|
||||||
@Deprecated
|
|
||||||
public static PaymentMethod CASH_APP = getDummyPaymentMethod(CASH_APP_ID); // Removed due too high chargeback risk
|
|
||||||
@Deprecated
|
|
||||||
public static PaymentMethod VENMO = getDummyPaymentMethod(VENMO_ID); // Removed due too high chargeback risk
|
|
||||||
|
|
||||||
// The limit and duration assignment must not be changed as that could break old offers (if amount would be higher
|
// The limit and duration assignment must not be changed as that could break old offers (if amount would be higher
|
||||||
// than new trade limit) and violate the maker expectation when he created the offer (duration).
|
// than new trade limit) and violate the maker expectation when he created the offer (duration).
|
||||||
|
@ -280,9 +279,9 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
|
|
||||||
// US
|
// US
|
||||||
ZELLE = new PaymentMethod(ZELLE_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(ZelleAccount.SUPPORTED_CURRENCIES)),
|
ZELLE = new PaymentMethod(ZELLE_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(ZelleAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
|
||||||
POPMONEY = new PaymentMethod(POPMONEY_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(PopmoneyAccount.SUPPORTED_CURRENCIES)),
|
POPMONEY = new PaymentMethod(POPMONEY_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(PopmoneyAccount.SUPPORTED_CURRENCIES)),
|
||||||
US_POSTAL_MONEY_ORDER = new PaymentMethod(US_POSTAL_MONEY_ORDER_ID, 8 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(USPostalMoneyOrderAccount.SUPPORTED_CURRENCIES)),
|
US_POSTAL_MONEY_ORDER = new PaymentMethod(US_POSTAL_MONEY_ORDER_ID, 8 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(USPostalMoneyOrderAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
VENMO = new PaymentMethod(VENMO_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(VenmoAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
|
||||||
// Canada
|
// Canada
|
||||||
INTERAC_E_TRANSFER = new PaymentMethod(INTERAC_E_TRANSFER_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(InteracETransferAccount.SUPPORTED_CURRENCIES)),
|
INTERAC_E_TRANSFER = new PaymentMethod(INTERAC_E_TRANSFER_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(InteracETransferAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
@ -326,6 +325,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
SWIFT = new PaymentMethod(SWIFT_ID, 7 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(SwiftAccount.SUPPORTED_CURRENCIES)),
|
SWIFT = new PaymentMethod(SWIFT_ID, 7 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(SwiftAccount.SUPPORTED_CURRENCIES)),
|
||||||
ACH_TRANSFER = new PaymentMethod(ACH_TRANSFER_ID, 5 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(AchTransferAccount.SUPPORTED_CURRENCIES)),
|
ACH_TRANSFER = new PaymentMethod(ACH_TRANSFER_ID, 5 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(AchTransferAccount.SUPPORTED_CURRENCIES)),
|
||||||
DOMESTIC_WIRE_TRANSFER = new PaymentMethod(DOMESTIC_WIRE_TRANSFER_ID, 3 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(DomesticWireTransferAccount.SUPPORTED_CURRENCIES)),
|
DOMESTIC_WIRE_TRANSFER = new PaymentMethod(DOMESTIC_WIRE_TRANSFER_ID, 3 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(DomesticWireTransferAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
PAYPAL = new PaymentMethod(PAYPAL_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(PayPalAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
CASH_APP = new PaymentMethod(CASH_APP_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(CashAppAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
|
||||||
// Japan
|
// Japan
|
||||||
JAPAN_BANK = new PaymentMethod(JAPAN_BANK_ID, DAY, DEFAULT_TRADE_LIMIT_LOW_RISK, getAssetCodes(JapanBankAccount.SUPPORTED_CURRENCIES)),
|
JAPAN_BANK = new PaymentMethod(JAPAN_BANK_ID, DAY, DEFAULT_TRADE_LIMIT_LOW_RISK, getAssetCodes(JapanBankAccount.SUPPORTED_CURRENCIES)),
|
||||||
|
@ -342,6 +343,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
|
|
||||||
// Cryptos
|
// Cryptos
|
||||||
BLOCK_CHAINS = new PaymentMethod(BLOCK_CHAINS_ID, DAY, DEFAULT_TRADE_LIMIT_VERY_LOW_RISK, Arrays.asList()),
|
BLOCK_CHAINS = new PaymentMethod(BLOCK_CHAINS_ID, DAY, DEFAULT_TRADE_LIMIT_VERY_LOW_RISK, Arrays.asList()),
|
||||||
|
|
||||||
// Cryptos with 1 hour trade period
|
// Cryptos with 1 hour trade period
|
||||||
BLOCK_CHAINS_INSTANT = new PaymentMethod(BLOCK_CHAINS_INSTANT_ID, TimeUnit.HOURS.toMillis(1), DEFAULT_TRADE_LIMIT_VERY_LOW_RISK, Arrays.asList())
|
BLOCK_CHAINS_INSTANT = new PaymentMethod(BLOCK_CHAINS_INSTANT_ID, TimeUnit.HOURS.toMillis(1), DEFAULT_TRADE_LIMIT_VERY_LOW_RISK, Arrays.asList())
|
||||||
);
|
);
|
||||||
|
@ -364,7 +366,10 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
TRANSFERWISE_ID,
|
TRANSFERWISE_ID,
|
||||||
UPHOLD_ID,
|
UPHOLD_ID,
|
||||||
ZELLE_ID,
|
ZELLE_ID,
|
||||||
AUSTRALIA_PAYID_ID);
|
AUSTRALIA_PAYID_ID,
|
||||||
|
CASH_APP_ID,
|
||||||
|
PAYPAL_ID,
|
||||||
|
VENMO_ID);
|
||||||
return paymentMethods.stream().filter(paymentMethod -> paymentMethodIds.contains(paymentMethod.getId())).collect(Collectors.toList());
|
return paymentMethods.stream().filter(paymentMethod -> paymentMethodIds.contains(paymentMethod.getId())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,7 +586,10 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
id.equals(PaymentMethod.CHASE_QUICK_PAY_ID) ||
|
id.equals(PaymentMethod.CHASE_QUICK_PAY_ID) ||
|
||||||
id.equals(PaymentMethod.POPMONEY_ID) ||
|
id.equals(PaymentMethod.POPMONEY_ID) ||
|
||||||
id.equals(PaymentMethod.MONEY_BEAM_ID) ||
|
id.equals(PaymentMethod.MONEY_BEAM_ID) ||
|
||||||
id.equals(PaymentMethod.UPHOLD_ID);
|
id.equals(PaymentMethod.UPHOLD_ID) ||
|
||||||
|
id.equals(PaymentMethod.CASH_APP_ID) ||
|
||||||
|
id.equals(PaymentMethod.PAYPAL_ID) ||
|
||||||
|
id.equals(PaymentMethod.VENMO_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isRoundedForAtmCash(String id) {
|
public static boolean isRoundedForAtmCash(String id) {
|
||||||
|
|
|
@ -40,16 +40,16 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
// Was added in 1.3.8
|
// Was added in 1.3.8
|
||||||
// To not break signed accounts we keep accountId as internal id used for signing.
|
// To not break signed accounts we keep accountId as internal id used for signing.
|
||||||
// Old accounts get a popup to add the new required field userName but accountId is
|
// Old accounts get a popup to add the new required field username but accountId is
|
||||||
// left unchanged. Newly created accounts fill accountId with the value of userName.
|
// left unchanged. Newly created accounts fill accountId with the value of username.
|
||||||
// In the UI we only use userName.
|
// In the UI we only use username.
|
||||||
|
|
||||||
// For backward compatibility we need to exclude the new field for the contract json.
|
// For backward compatibility we need to exclude the new field for the contract json.
|
||||||
// We can remove that after a while when risk that users with pre 1.3.8 version trade with updated
|
// We can remove that after a while when risk that users with pre 1.3.8 version trade with updated
|
||||||
// users is very low.
|
// users is very low.
|
||||||
@JsonExclude
|
@JsonExclude
|
||||||
@Getter
|
@Getter
|
||||||
private String userName = "";
|
private String username = "";
|
||||||
|
|
||||||
public RevolutAccountPayload(String paymentMethod, String id) {
|
public RevolutAccountPayload(String paymentMethod, String id) {
|
||||||
super(paymentMethod, id);
|
super(paymentMethod, id);
|
||||||
|
@ -62,7 +62,7 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
private RevolutAccountPayload(String paymentMethod,
|
private RevolutAccountPayload(String paymentMethod,
|
||||||
String id,
|
String id,
|
||||||
@Nullable String userName,
|
@Nullable String username,
|
||||||
long maxTradePeriod,
|
long maxTradePeriod,
|
||||||
Map<String, String> excludeFromJsonDataMap) {
|
Map<String, String> excludeFromJsonDataMap) {
|
||||||
super(paymentMethod,
|
super(paymentMethod,
|
||||||
|
@ -70,13 +70,13 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
maxTradePeriod,
|
maxTradePeriod,
|
||||||
excludeFromJsonDataMap);
|
excludeFromJsonDataMap);
|
||||||
|
|
||||||
this.userName = userName;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Message toProtoMessage() {
|
public Message toProtoMessage() {
|
||||||
protobuf.RevolutAccountPayload.Builder revolutBuilder = protobuf.RevolutAccountPayload.newBuilder()
|
protobuf.RevolutAccountPayload.Builder revolutBuilder = protobuf.RevolutAccountPayload.newBuilder()
|
||||||
.setUserName(userName);
|
.setUsername(username);
|
||||||
return getPaymentAccountPayloadBuilder().setRevolutAccountPayload(revolutBuilder).build();
|
return getPaymentAccountPayloadBuilder().setRevolutAccountPayload(revolutBuilder).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
protobuf.RevolutAccountPayload revolutAccountPayload = proto.getRevolutAccountPayload();
|
protobuf.RevolutAccountPayload revolutAccountPayload = proto.getRevolutAccountPayload();
|
||||||
return new RevolutAccountPayload(proto.getPaymentMethodId(),
|
return new RevolutAccountPayload(proto.getPaymentMethodId(),
|
||||||
proto.getId(),
|
proto.getId(),
|
||||||
revolutAccountPayload.getUserName(),
|
revolutAccountPayload.getUsername(),
|
||||||
proto.getMaxTradePeriod(),
|
proto.getMaxTradePeriod(),
|
||||||
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
||||||
}
|
}
|
||||||
|
@ -104,9 +104,9 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
private Tuple2<String, String> getLabelValueTuple() {
|
private Tuple2<String, String> getLabelValueTuple() {
|
||||||
String label;
|
String label;
|
||||||
String value;
|
String value;
|
||||||
checkArgument(!userName.isEmpty(), "Username must be set");
|
checkArgument(!username.isEmpty(), "Username must be set");
|
||||||
label = Res.get("payment.account.userName");
|
label = Res.get("payment.account.username");
|
||||||
value = userName;
|
value = username;
|
||||||
return new Tuple2<>(label, value);
|
return new Tuple2<>(label, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,14 +123,14 @@ public final class RevolutAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getAgeWitnessInputData() {
|
public byte[] getAgeWitnessInputData() {
|
||||||
return super.getAgeWitnessInputData(userName.getBytes(StandardCharsets.UTF_8));
|
return super.getAgeWitnessInputData(username.getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean userNameNotSet() {
|
public boolean usernameNotSet() {
|
||||||
return userName.isEmpty();
|
return username.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserName(String userName) {
|
public void setUserName(String username) {
|
||||||
this.userName = userName;
|
this.username = username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public final class SatispayAccountPayload extends CountryBasedPaymentAccountPayl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.userName") + " " + holderName;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.username") + " " + holderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -86,7 +86,7 @@ public final class StrikeAccountPayload extends CountryBasedPaymentAccountPayloa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.userName") + " " + holderName;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.username") + " " + holderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -96,7 +96,7 @@ public final class TransferwiseUsdAccountPayload extends CountryBasedPaymentAcco
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.userName") + " " + holderName;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.username") + " " + holderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,17 +29,13 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
// Cannot be deleted as it would break old trade history entries
|
|
||||||
// Removed due too high chargeback risk
|
|
||||||
@Deprecated
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString
|
@ToString
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public final class VenmoAccountPayload extends PaymentAccountPayload {
|
public final class VenmoAccountPayload extends PaymentAccountPayload {
|
||||||
private String venmoUserName = "";
|
private String emailOrMobileNrOrUsername = "";
|
||||||
private String holderName = "";
|
|
||||||
|
|
||||||
public VenmoAccountPayload(String paymentMethod, String id) {
|
public VenmoAccountPayload(String paymentMethod, String id) {
|
||||||
super(paymentMethod, id);
|
super(paymentMethod, id);
|
||||||
|
@ -52,8 +48,7 @@ public final class VenmoAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
private VenmoAccountPayload(String paymentMethod,
|
private VenmoAccountPayload(String paymentMethod,
|
||||||
String id,
|
String id,
|
||||||
String venmoUserName,
|
String emailOrMobileNrOrUsername,
|
||||||
String holderName,
|
|
||||||
long maxTradePeriod,
|
long maxTradePeriod,
|
||||||
Map<String, String> excludeFromJsonDataMap) {
|
Map<String, String> excludeFromJsonDataMap) {
|
||||||
super(paymentMethod,
|
super(paymentMethod,
|
||||||
|
@ -61,24 +56,21 @@ public final class VenmoAccountPayload extends PaymentAccountPayload {
|
||||||
maxTradePeriod,
|
maxTradePeriod,
|
||||||
excludeFromJsonDataMap);
|
excludeFromJsonDataMap);
|
||||||
|
|
||||||
this.venmoUserName = venmoUserName;
|
this.emailOrMobileNrOrUsername = emailOrMobileNrOrUsername;
|
||||||
this.holderName = holderName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Message toProtoMessage() {
|
public Message toProtoMessage() {
|
||||||
return getPaymentAccountPayloadBuilder()
|
return getPaymentAccountPayloadBuilder()
|
||||||
.setVenmoAccountPayload(protobuf.VenmoAccountPayload.newBuilder()
|
.setVenmoAccountPayload(protobuf.VenmoAccountPayload.newBuilder()
|
||||||
.setVenmoUserName(venmoUserName)
|
.setEmailOrMobileNrOrUsername(emailOrMobileNrOrUsername))
|
||||||
.setHolderName(holderName))
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VenmoAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
|
public static VenmoAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
|
||||||
return new VenmoAccountPayload(proto.getPaymentMethodId(),
|
return new VenmoAccountPayload(proto.getPaymentMethodId(),
|
||||||
proto.getId(),
|
proto.getId(),
|
||||||
proto.getVenmoAccountPayload().getVenmoUserName(),
|
proto.getVenmoAccountPayload().getEmailOrMobileNrOrUsername(),
|
||||||
proto.getVenmoAccountPayload().getHolderName(),
|
|
||||||
proto.getMaxTradePeriod(),
|
proto.getMaxTradePeriod(),
|
||||||
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
new HashMap<>(proto.getExcludeFromJsonDataMap()));
|
||||||
}
|
}
|
||||||
|
@ -90,8 +82,7 @@ public final class VenmoAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
|
return Res.getWithCol("payment.email.mobile.username") + " " + emailOrMobileNrOrUsername;
|
||||||
Res.getWithCol("payment.venmo.venmoUserName") + " " + venmoUserName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -101,11 +92,6 @@ public final class VenmoAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getAgeWitnessInputData() {
|
public byte[] getAgeWitnessInputData() {
|
||||||
return super.getAgeWitnessInputData(venmoUserName.getBytes(StandardCharsets.UTF_8));
|
return super.getAgeWitnessInputData(emailOrMobileNrOrUsername.getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getOwnerId() {
|
|
||||||
return holderName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public final class VerseAccountPayload extends PaymentAccountPayload {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentDetails() {
|
public String getPaymentDetails() {
|
||||||
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.userName") + " " + holderName;
|
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.username") + " " + holderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.core.payment.validation;
|
||||||
|
|
||||||
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
|
||||||
|
public final class EmailOrMobileNrOrCashtagValidator extends InputValidator {
|
||||||
|
|
||||||
|
private final EmailOrMobileNrValidator emailOrMobileNrValidator;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Public methods
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public EmailOrMobileNrOrCashtagValidator() {
|
||||||
|
emailOrMobileNrValidator = new EmailOrMobileNrValidator();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ValidationResult validate(String input) {
|
||||||
|
ValidationResult result = validateIfNotEmpty(input);
|
||||||
|
if (!result.isValid) {
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
ValidationResult emailOrMobileResult = emailOrMobileNrValidator.validate(input);
|
||||||
|
if (emailOrMobileResult.isValid)
|
||||||
|
return emailOrMobileResult;
|
||||||
|
else
|
||||||
|
return validateCashtag(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Private methods
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// TODO not impl yet -> see InteracETransferValidator
|
||||||
|
private ValidationResult validateCashtag(String input) {
|
||||||
|
return super.validate(input);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.core.payment.validation;
|
||||||
|
|
||||||
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
|
||||||
|
public final class EmailOrMobileNrOrUsernameValidator extends InputValidator {
|
||||||
|
|
||||||
|
private final EmailOrMobileNrValidator emailOrMobileNrValidator;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Public methods
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public EmailOrMobileNrOrUsernameValidator() {
|
||||||
|
emailOrMobileNrValidator = new EmailOrMobileNrValidator();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ValidationResult validate(String input) {
|
||||||
|
ValidationResult result = validateIfNotEmpty(input);
|
||||||
|
if (!result.isValid) {
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
ValidationResult emailOrMobileResult = emailOrMobileNrValidator.validate(input);
|
||||||
|
if (emailOrMobileResult.isValid)
|
||||||
|
return emailOrMobileResult;
|
||||||
|
else
|
||||||
|
return validateName(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Private methods
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// TODO: properly implement username validation
|
||||||
|
private ValidationResult validateName(String input) {
|
||||||
|
return super.validate(input);
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,8 +19,8 @@ package haveno.core.payment.validation;
|
||||||
|
|
||||||
public final class RevolutValidator extends LengthValidator {
|
public final class RevolutValidator extends LengthValidator {
|
||||||
public RevolutValidator() {
|
public RevolutValidator() {
|
||||||
// Not sure what are requirements for Revolut user names
|
// Not sure what are requirements for Revolut usernames
|
||||||
// Please keep in mind that even we force users to set user name at startup we should handle also the case
|
// Please keep in mind that even we force users to set username at startup we should handle also the case
|
||||||
// that the old accountID as phone number or email is displayed at the username text field and we do not
|
// that the old accountID as phone number or email is displayed at the username text field and we do not
|
||||||
// want to break validation in those cases. So being too strict on the validators might cause more troubles
|
// want to break validation in those cases. So being too strict on the validators might cause more troubles
|
||||||
// as its worth...
|
// as its worth...
|
||||||
|
|
|
@ -54,6 +54,7 @@ import haveno.core.payment.payload.NequiAccountPayload;
|
||||||
import haveno.core.payment.payload.OKPayAccountPayload;
|
import haveno.core.payment.payload.OKPayAccountPayload;
|
||||||
import haveno.core.payment.payload.PaxumAccountPayload;
|
import haveno.core.payment.payload.PaxumAccountPayload;
|
||||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
|
import haveno.core.payment.payload.PayPalAccountPayload;
|
||||||
import haveno.core.payment.payload.PayseraAccountPayload;
|
import haveno.core.payment.payload.PayseraAccountPayload;
|
||||||
import haveno.core.payment.payload.PaytmAccountPayload;
|
import haveno.core.payment.payload.PaytmAccountPayload;
|
||||||
import haveno.core.payment.payload.PerfectMoneyAccountPayload;
|
import haveno.core.payment.payload.PerfectMoneyAccountPayload;
|
||||||
|
@ -236,6 +237,8 @@ public class CoreProtoResolver implements ProtoResolver {
|
||||||
return CashAppAccountPayload.fromProto(proto);
|
return CashAppAccountPayload.fromProto(proto);
|
||||||
case VENMO_ACCOUNT_PAYLOAD:
|
case VENMO_ACCOUNT_PAYLOAD:
|
||||||
return VenmoAccountPayload.fromProto(proto);
|
return VenmoAccountPayload.fromProto(proto);
|
||||||
|
case PAYPAL_ACCOUNT_PAYLOAD:
|
||||||
|
return PayPalAccountPayload.fromProto(proto);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ProtobufferRuntimeException("Unknown proto message case(PB.PaymentAccountPayload). messageCase=" + messageCase);
|
throw new ProtobufferRuntimeException("Unknown proto message case(PB.PaymentAccountPayload). messageCase=" + messageCase);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class DisputeAgentLookupMap {
|
||||||
case "6c4cim7h7t3bm4bnchbf727qrhdfrfr6lhod25wjtizm2sifpkktvwad.onion:9999":
|
case "6c4cim7h7t3bm4bnchbf727qrhdfrfr6lhod25wjtizm2sifpkktvwad.onion:9999":
|
||||||
return "pazza83";
|
return "pazza83";
|
||||||
default:
|
default:
|
||||||
log.warn("No user name for dispute agent with address {} found.", fullAddress);
|
log.warn("No username for dispute agent with address {} found.", fullAddress);
|
||||||
return Res.get("shared.na");
|
return Res.get("shared.na");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,8 @@ public final class TradeStatistics3 implements ProcessOncePersistableNetworkPayl
|
||||||
TIKKIE,
|
TIKKIE,
|
||||||
TRANSFERWISE_USD,
|
TRANSFERWISE_USD,
|
||||||
ACH_TRANSFER,
|
ACH_TRANSFER,
|
||||||
DOMESTIC_WIRE_TRANSFER
|
DOMESTIC_WIRE_TRANSFER,
|
||||||
|
PAYPAL
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -2479,7 +2479,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Account
|
payment.account=Account
|
||||||
payment.account.no=Account no.
|
payment.account.no=Account no.
|
||||||
payment.account.name=Account name
|
payment.account.name=Account name
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Account owner full name
|
payment.account.owner=Account owner full name
|
||||||
payment.account.fullName=Full name (first, middle, last)
|
payment.account.fullName=Full name (first, middle, last)
|
||||||
|
@ -2500,6 +2500,8 @@ payment.email=Email
|
||||||
payment.country=Country
|
payment.country=Country
|
||||||
payment.extras=Extra requirements
|
payment.extras=Extra requirements
|
||||||
payment.email.mobile=Email or mobile no.
|
payment.email.mobile=Email or mobile no.
|
||||||
|
payment.email.mobile.cashtag=Cashtag, email, or mobile no.
|
||||||
|
payment.email.mobile.username=Username, email, or mobile no.
|
||||||
payment.crypto.address=Cryptocurrency address
|
payment.crypto.address=Cryptocurrency address
|
||||||
payment.crypto.tradeInstantCheckbox=Trade instant (within 1 hour) with this Cryptocurrency
|
payment.crypto.tradeInstantCheckbox=Trade instant (within 1 hour) with this Cryptocurrency
|
||||||
payment.crypto.tradeInstant.popup=For instant trading it is required that both trading peers are online to be able \
|
payment.crypto.tradeInstant.popup=For instant trading it is required that both trading peers are online to be able \
|
||||||
|
@ -2554,7 +2556,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Username or email or phone no.
|
payment.uphold.accountId=Username or email or phone no.
|
||||||
payment.moneyBeam.accountId=Email or phone no.
|
payment.moneyBeam.accountId=Email or phone no.
|
||||||
payment.venmo.venmoUserName=Venmo username
|
|
||||||
payment.popmoney.accountId=Email or phone no.
|
payment.popmoney.accountId=Email or phone no.
|
||||||
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
|
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
|
||||||
payment.supportedCurrencies=Supported currencies
|
payment.supportedCurrencies=Supported currencies
|
||||||
|
@ -2658,13 +2659,17 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
payment.cashDeposit.info=Please confirm your bank allows you to send cash deposits into other peoples' accounts. \
|
payment.cashDeposit.info=Please confirm your bank allows you to send cash deposits into other peoples' accounts. \
|
||||||
For example, Bank of America and Wells Fargo no longer allow such deposits.
|
For example, Bank of America and Wells Fargo no longer allow such deposits.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\n\
|
payment.account.revolut.addUserNameInfo={0}\n\
|
||||||
Your existing Revolut account ({1}) does not have a ''User name''.\n\
|
Your existing Revolut account ({1}) does not have a ''Username''.\n\
|
||||||
Please enter your Revolut ''User name'' to update your account data.\n\
|
Please enter your Revolut ''Username'' to update your account data.\n\
|
||||||
This will not affect your account age signing status.
|
This will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
|
payment.cashapp.info=Cash App has higher chargeback risk than most bank transfers. Please be aware of this when trading with Cash App.
|
||||||
|
payment.venmo.info=Venmo has higher chargeback risk than most bank transfers. Please be aware of this when trading with Venmo.
|
||||||
|
payment.paypal.info=PayPal has higher chargeback risk than most bank transfers. Please be aware of this when trading with PayPal.
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
payment.account.amazonGiftCard.addCountryInfo={0}\n\
|
payment.account.amazonGiftCard.addCountryInfo={0}\n\
|
||||||
Your existing Amazon Gift Card account ({1}) does not have a Country specified.\n\
|
Your existing Amazon Gift Card account ({1}) does not have a Country specified.\n\
|
||||||
|
@ -3159,7 +3164,7 @@ OK_PAY=OKPay
|
||||||
CASH_APP=Cash App
|
CASH_APP=Cash App
|
||||||
# suppress inspection "UnusedProperty"
|
# suppress inspection "UnusedProperty"
|
||||||
VENMO=Venmo
|
VENMO=Venmo
|
||||||
|
PAYPAL=PayPal
|
||||||
|
|
||||||
# suppress inspection "UnusedProperty"
|
# suppress inspection "UnusedProperty"
|
||||||
UPHOLD_SHORT=Uphold
|
UPHOLD_SHORT=Uphold
|
||||||
|
@ -3255,6 +3260,7 @@ OK_PAY_SHORT=OKPay
|
||||||
CASH_APP_SHORT=Cash App
|
CASH_APP_SHORT=Cash App
|
||||||
# suppress inspection "UnusedProperty"
|
# suppress inspection "UnusedProperty"
|
||||||
VENMO_SHORT=Venmo
|
VENMO_SHORT=Venmo
|
||||||
|
PAYPAL_SHORT=PayPal
|
||||||
|
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
|
@ -1875,7 +1875,7 @@ seed.restore.openOffers.warn=Máte otevřené nabídky, které budou odstraněny
|
||||||
payment.account=Účet
|
payment.account=Účet
|
||||||
payment.account.no=Číslo účtu
|
payment.account.no=Číslo účtu
|
||||||
payment.account.name=Název účtu
|
payment.account.name=Název účtu
|
||||||
payment.account.userName=Uživatelské jméno
|
payment.account.username=Uživatelské jméno
|
||||||
payment.account.phoneNr=Telefonní číslo
|
payment.account.phoneNr=Telefonní číslo
|
||||||
payment.account.owner=Celé jméno vlastníka účtu
|
payment.account.owner=Celé jméno vlastníka účtu
|
||||||
payment.account.fullName=Celé jméno (křestní, střední, příjmení)
|
payment.account.fullName=Celé jméno (křestní, střední, příjmení)
|
||||||
|
@ -1907,7 +1907,6 @@ payment.amazon.site=Kupte Amazon eGift zde:
|
||||||
payment.ask=Zjistěte pomocí obchodního chatu
|
payment.ask=Zjistěte pomocí obchodního chatu
|
||||||
payment.uphold.accountId=Uživatelské jméno, e-mail nebo číslo telefonu
|
payment.uphold.accountId=Uživatelské jméno, e-mail nebo číslo telefonu
|
||||||
payment.moneyBeam.accountId=E-mail nebo číslo telefonu
|
payment.moneyBeam.accountId=E-mail nebo číslo telefonu
|
||||||
payment.venmo.venmoUserName=Uživatelské jméno Venmo
|
|
||||||
payment.popmoney.accountId=E-mail nebo číslo telefonu
|
payment.popmoney.accountId=E-mail nebo číslo telefonu
|
||||||
payment.promptPay.promptPayId=Občanské/daňové identifikační číslo nebo telefonní číslo
|
payment.promptPay.promptPayId=Občanské/daňové identifikační číslo nebo telefonní číslo
|
||||||
payment.supportedCurrencies=Podporované měny
|
payment.supportedCurrencies=Podporované měny
|
||||||
|
|
|
@ -1876,7 +1876,7 @@ seed.restore.openOffers.warn=Sie haben noch offene Angebote die entfernt werden
|
||||||
payment.account=Konto
|
payment.account=Konto
|
||||||
payment.account.no=Kontonummer
|
payment.account.no=Kontonummer
|
||||||
payment.account.name=Kontoname
|
payment.account.name=Kontoname
|
||||||
payment.account.userName=Benutzername
|
payment.account.username=Benutzername
|
||||||
payment.account.phoneNr=Telefonnummer
|
payment.account.phoneNr=Telefonnummer
|
||||||
payment.account.owner=Vollständiger Name des Kontoinhabers
|
payment.account.owner=Vollständiger Name des Kontoinhabers
|
||||||
payment.account.fullName=Vollständiger Name (vor, zweit, nach)
|
payment.account.fullName=Vollständiger Name (vor, zweit, nach)
|
||||||
|
@ -1908,7 +1908,6 @@ payment.amazon.site=Kaufe Geschenkkarte auf
|
||||||
payment.ask=Im Trader Chat fragen
|
payment.ask=Im Trader Chat fragen
|
||||||
payment.uphold.accountId=Nutzername oder Email oder Telefonnr.
|
payment.uphold.accountId=Nutzername oder Email oder Telefonnr.
|
||||||
payment.moneyBeam.accountId=E-Mail oder Telefonnummer
|
payment.moneyBeam.accountId=E-Mail oder Telefonnummer
|
||||||
payment.venmo.venmoUserName=Venmo Nutzername
|
|
||||||
payment.popmoney.accountId=E-Mail oder Telefonnummer
|
payment.popmoney.accountId=E-Mail oder Telefonnummer
|
||||||
payment.promptPay.promptPayId=Personalausweis/Steuernummer oder Telefonnr.
|
payment.promptPay.promptPayId=Personalausweis/Steuernummer oder Telefonnr.
|
||||||
payment.supportedCurrencies=Unterstützte Währungen
|
payment.supportedCurrencies=Unterstützte Währungen
|
||||||
|
|
|
@ -1876,7 +1876,7 @@ seed.restore.openOffers.warn=Tiene ofertas abiertas que serán eliminadas si res
|
||||||
payment.account=Cuenta
|
payment.account=Cuenta
|
||||||
payment.account.no=Número de cuenta
|
payment.account.no=Número de cuenta
|
||||||
payment.account.name=Nombre de cuenta
|
payment.account.name=Nombre de cuenta
|
||||||
payment.account.userName=Nombre de usuario
|
payment.account.username=Nombre de usuario
|
||||||
payment.account.phoneNr=Número de teléfono
|
payment.account.phoneNr=Número de teléfono
|
||||||
payment.account.owner=Nombre completo del propietario de la cuenta
|
payment.account.owner=Nombre completo del propietario de la cuenta
|
||||||
payment.account.fullName=Nombre completo
|
payment.account.fullName=Nombre completo
|
||||||
|
@ -1908,7 +1908,6 @@ payment.amazon.site=Compre una tarjeta regalo en
|
||||||
payment.ask=Pregunte en el Chat de Intercambio
|
payment.ask=Pregunte en el Chat de Intercambio
|
||||||
payment.uphold.accountId=Nombre de usuario, correo electrónico o núm de teléfono
|
payment.uphold.accountId=Nombre de usuario, correo electrónico o núm de teléfono
|
||||||
payment.moneyBeam.accountId=Correo electrónico o núm. de telefóno
|
payment.moneyBeam.accountId=Correo electrónico o núm. de telefóno
|
||||||
payment.venmo.venmoUserName=Nombre de usuario Venmo
|
|
||||||
payment.popmoney.accountId=Correo electrónico o núm. de telefóno
|
payment.popmoney.accountId=Correo electrónico o núm. de telefóno
|
||||||
payment.promptPay.promptPayId=Citizen ID/Tax ID o número de teléfono
|
payment.promptPay.promptPayId=Citizen ID/Tax ID o número de teléfono
|
||||||
payment.supportedCurrencies=Monedas soportadas
|
payment.supportedCurrencies=Monedas soportadas
|
||||||
|
|
|
@ -1869,7 +1869,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=حساب
|
payment.account=حساب
|
||||||
payment.account.no=شماره حساب
|
payment.account.no=شماره حساب
|
||||||
payment.account.name=نام حساب
|
payment.account.name=نام حساب
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=نام کامل مالک حساب
|
payment.account.owner=نام کامل مالک حساب
|
||||||
payment.account.fullName=نام کامل (اول، وسط، آخر)
|
payment.account.fullName=نام کامل (اول، وسط، آخر)
|
||||||
|
@ -1901,7 +1901,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=نام کاربری یا ایمیل یا شماره تلفن
|
payment.uphold.accountId=نام کاربری یا ایمیل یا شماره تلفن
|
||||||
payment.moneyBeam.accountId=ایمیل یا شماره تلفن
|
payment.moneyBeam.accountId=ایمیل یا شماره تلفن
|
||||||
payment.venmo.venmoUserName=نام کاربری Venmo
|
|
||||||
payment.popmoney.accountId=ایمیل یا شماره تلفن
|
payment.popmoney.accountId=ایمیل یا شماره تلفن
|
||||||
payment.promptPay.promptPayId=شناسه شهروندی/شناسه مالیاتی یا شماره تلفن
|
payment.promptPay.promptPayId=شناسه شهروندی/شناسه مالیاتی یا شماره تلفن
|
||||||
payment.supportedCurrencies=ارزهای مورد حمایت
|
payment.supportedCurrencies=ارزهای مورد حمایت
|
||||||
|
@ -1956,8 +1955,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=لطفا مطمئن شوید که بانک شما اجازه پرداخت سپرده نفد به حساب دیگر افراد را میدهد. برای مثال، Bank of America و Wells Fargo دیگر اجازه چنین پرداختهایی را نمیدهند.
|
payment.cashDeposit.info=لطفا مطمئن شوید که بانک شما اجازه پرداخت سپرده نفد به حساب دیگر افراد را میدهد. برای مثال، Bank of America و Wells Fargo دیگر اجازه چنین پرداختهایی را نمیدهند.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1877,7 +1877,7 @@ seed.restore.openOffers.warn=Vous avez des offres ouvertes qui seront retirées
|
||||||
payment.account=Compte
|
payment.account=Compte
|
||||||
payment.account.no=N° de compte
|
payment.account.no=N° de compte
|
||||||
payment.account.name=Nom du compte
|
payment.account.name=Nom du compte
|
||||||
payment.account.userName=Nom de l'utilisateur
|
payment.account.username=Nom de l'utilisateur
|
||||||
payment.account.phoneNr=Numéro de téléphone
|
payment.account.phoneNr=Numéro de téléphone
|
||||||
payment.account.owner=Nom et prénoms du propriétaire du compte
|
payment.account.owner=Nom et prénoms du propriétaire du compte
|
||||||
payment.account.fullName=Nom complet (prénom, deuxième prénom, nom de famille)
|
payment.account.fullName=Nom complet (prénom, deuxième prénom, nom de famille)
|
||||||
|
@ -1909,7 +1909,6 @@ payment.amazon.site=Acheter la carte cadeau à
|
||||||
payment.ask=Demander dans le chat de trade
|
payment.ask=Demander dans le chat de trade
|
||||||
payment.uphold.accountId=Nom d'utilisateur ou email ou N° de téléphone
|
payment.uphold.accountId=Nom d'utilisateur ou email ou N° de téléphone
|
||||||
payment.moneyBeam.accountId=Email ou N° de téléphone
|
payment.moneyBeam.accountId=Email ou N° de téléphone
|
||||||
payment.venmo.venmoUserName=Nom d'utilisateur Venmo
|
|
||||||
payment.popmoney.accountId=Email ou N° de téléphone
|
payment.popmoney.accountId=Email ou N° de téléphone
|
||||||
payment.promptPay.promptPayId=N° de carte d'identité/d'identification du contribuable ou numéro de téléphone
|
payment.promptPay.promptPayId=N° de carte d'identité/d'identification du contribuable ou numéro de téléphone
|
||||||
payment.supportedCurrencies=Devises acceptées
|
payment.supportedCurrencies=Devises acceptées
|
||||||
|
|
|
@ -1871,7 +1871,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Account
|
payment.account=Account
|
||||||
payment.account.no=Account n°
|
payment.account.no=Account n°
|
||||||
payment.account.name=Nome conto
|
payment.account.name=Nome conto
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Nome completo del proprietario del conto
|
payment.account.owner=Nome completo del proprietario del conto
|
||||||
payment.account.fullName=Nome completo (nome, secondo nome, cognome)
|
payment.account.fullName=Nome completo (nome, secondo nome, cognome)
|
||||||
|
@ -1903,7 +1903,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Nome utente o e-mail o n. di telefono
|
payment.uphold.accountId=Nome utente o e-mail o n. di telefono
|
||||||
payment.moneyBeam.accountId=Email o numero di telefono fisso
|
payment.moneyBeam.accountId=Email o numero di telefono fisso
|
||||||
payment.venmo.venmoUserName=Nome utente Venmo
|
|
||||||
payment.popmoney.accountId=Email o numero di telefono fisso
|
payment.popmoney.accountId=Email o numero di telefono fisso
|
||||||
payment.promptPay.promptPayId=Codice fiscale/P.IVA o n. di telefono
|
payment.promptPay.promptPayId=Codice fiscale/P.IVA o n. di telefono
|
||||||
payment.supportedCurrencies=Valute supportate
|
payment.supportedCurrencies=Valute supportate
|
||||||
|
@ -1958,8 +1957,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=Conferma che la tua banca ti consente di inviare depositi in contanti su conti di altre persone. Ad esempio, Bank of America e Wells Fargo non consentono più tali depositi.
|
payment.cashDeposit.info=Conferma che la tua banca ti consente di inviare depositi in contanti su conti di altre persone. Ad esempio, Bank of America e Wells Fargo non consentono più tali depositi.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1875,7 +1875,7 @@ seed.restore.openOffers.warn=シードワードから復元すると削除され
|
||||||
payment.account=アカウント
|
payment.account=アカウント
|
||||||
payment.account.no=アカウント番号
|
payment.account.no=アカウント番号
|
||||||
payment.account.name=アカウント名
|
payment.account.name=アカウント名
|
||||||
payment.account.userName=ユーザ名
|
payment.account.username=ユーザ名
|
||||||
payment.account.phoneNr=電話番号
|
payment.account.phoneNr=電話番号
|
||||||
payment.account.owner=アカウント所有者の氏名
|
payment.account.owner=アカウント所有者の氏名
|
||||||
payment.account.fullName=氏名(名、ミドルネーム、姓)
|
payment.account.fullName=氏名(名、ミドルネーム、姓)
|
||||||
|
@ -1907,7 +1907,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=ユーザーネームかメールか電話番号
|
payment.uphold.accountId=ユーザーネームかメールか電話番号
|
||||||
payment.moneyBeam.accountId=メールか電話番号
|
payment.moneyBeam.accountId=メールか電話番号
|
||||||
payment.venmo.venmoUserName=Venmo ユーザー名
|
|
||||||
payment.popmoney.accountId=メールか電話番号
|
payment.popmoney.accountId=メールか電話番号
|
||||||
payment.promptPay.promptPayId=市民ID/納税者番号または電話番号
|
payment.promptPay.promptPayId=市民ID/納税者番号または電話番号
|
||||||
payment.supportedCurrencies=サポートされている通貨
|
payment.supportedCurrencies=サポートされている通貨
|
||||||
|
|
|
@ -1879,7 +1879,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Conta
|
payment.account=Conta
|
||||||
payment.account.no=Nº da conta
|
payment.account.no=Nº da conta
|
||||||
payment.account.name=Nome da conta
|
payment.account.name=Nome da conta
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Nome completo do titular da conta
|
payment.account.owner=Nome completo do titular da conta
|
||||||
payment.account.fullName=Nome completo (nome e sobrenome)
|
payment.account.fullName=Nome completo (nome e sobrenome)
|
||||||
|
@ -1911,7 +1911,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Nome de usuário, e-mail ou nº de telefone
|
payment.uphold.accountId=Nome de usuário, e-mail ou nº de telefone
|
||||||
payment.moneyBeam.accountId=E-mail ou nº de telefone
|
payment.moneyBeam.accountId=E-mail ou nº de telefone
|
||||||
payment.venmo.venmoUserName=Nome do usuário do Venmo
|
|
||||||
payment.popmoney.accountId=E-mail ou nº de telefone
|
payment.popmoney.accountId=E-mail ou nº de telefone
|
||||||
payment.promptPay.promptPayId=ID de cidadão/ID de impostos ou nº de telefone
|
payment.promptPay.promptPayId=ID de cidadão/ID de impostos ou nº de telefone
|
||||||
payment.supportedCurrencies=Moedas disponíveis
|
payment.supportedCurrencies=Moedas disponíveis
|
||||||
|
@ -1966,8 +1965,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=Certifique-se de que o seu banco permite a realização de depósitos em espécie na conta de terceiros.
|
payment.cashDeposit.info=Certifique-se de que o seu banco permite a realização de depósitos em espécie na conta de terceiros.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1869,7 +1869,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Conta
|
payment.account=Conta
|
||||||
payment.account.no=Nº da conta
|
payment.account.no=Nº da conta
|
||||||
payment.account.name=Nome da conta
|
payment.account.name=Nome da conta
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Nome completo do titular da conta
|
payment.account.owner=Nome completo do titular da conta
|
||||||
payment.account.fullName=Nome completo (primeiro, nome do meio, último)
|
payment.account.fullName=Nome completo (primeiro, nome do meio, último)
|
||||||
|
@ -1901,7 +1901,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Nome de utilizador, email ou nº de telemóvel
|
payment.uphold.accountId=Nome de utilizador, email ou nº de telemóvel
|
||||||
payment.moneyBeam.accountId=Email ou nº de telemóvel
|
payment.moneyBeam.accountId=Email ou nº de telemóvel
|
||||||
payment.venmo.venmoUserName=Nome de utilizador do Venmo
|
|
||||||
payment.popmoney.accountId=Email ou nº de telemóvel
|
payment.popmoney.accountId=Email ou nº de telemóvel
|
||||||
payment.promptPay.promptPayId=ID de cidadão/ID de impostos ou nº de telemóvel
|
payment.promptPay.promptPayId=ID de cidadão/ID de impostos ou nº de telemóvel
|
||||||
payment.supportedCurrencies=Moedas suportadas
|
payment.supportedCurrencies=Moedas suportadas
|
||||||
|
@ -1956,8 +1955,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=Por favor, confirme que seu banco permite-lhe enviar depósitos em dinheiro para contas de outras pessoas. Por exemplo, o Bank of America e o Wells Fargo não permitem mais esses depósitos.
|
payment.cashDeposit.info=Por favor, confirme que seu banco permite-lhe enviar depósitos em dinheiro para contas de outras pessoas. Por exemplo, o Bank of America e o Wells Fargo não permitem mais esses depósitos.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1870,7 +1870,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Счёт
|
payment.account=Счёт
|
||||||
payment.account.no=Номер счёта
|
payment.account.no=Номер счёта
|
||||||
payment.account.name=Название счёта
|
payment.account.name=Название счёта
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Полное имя владельца счёта
|
payment.account.owner=Полное имя владельца счёта
|
||||||
payment.account.fullName=Полное имя (имя, отчество, фамилия)
|
payment.account.fullName=Полное имя (имя, отчество, фамилия)
|
||||||
|
@ -1902,7 +1902,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Имя пользователя, эл. адрес или тел. номер
|
payment.uphold.accountId=Имя пользователя, эл. адрес или тел. номер
|
||||||
payment.moneyBeam.accountId=Эл. адрес или тел. номер
|
payment.moneyBeam.accountId=Эл. адрес или тел. номер
|
||||||
payment.venmo.venmoUserName=Имя пользователя Venmo
|
|
||||||
payment.popmoney.accountId=Эл. адрес или тел. номер
|
payment.popmoney.accountId=Эл. адрес или тел. номер
|
||||||
payment.promptPay.promptPayId=Удостовер. личности / налог. номер или номер телефона
|
payment.promptPay.promptPayId=Удостовер. личности / налог. номер или номер телефона
|
||||||
payment.supportedCurrencies=Поддерживаемые валюты
|
payment.supportedCurrencies=Поддерживаемые валюты
|
||||||
|
@ -1957,8 +1956,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=Убедитесь, что ваш банк позволяет отправлять денежные переводы на счета других лиц. Например, Bank of America и Wells Fargo больше не разрешают такие переводы.
|
payment.cashDeposit.info=Убедитесь, что ваш банк позволяет отправлять денежные переводы на счета других лиц. Например, Bank of America и Wells Fargo больше не разрешают такие переводы.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1870,7 +1870,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=บัญชี
|
payment.account=บัญชี
|
||||||
payment.account.no=หมายเลขบัญชี
|
payment.account.no=หมายเลขบัญชี
|
||||||
payment.account.name=ชื่อบัญชี
|
payment.account.name=ชื่อบัญชี
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=ชื่อเต็มของเจ้าของบัญชี
|
payment.account.owner=ชื่อเต็มของเจ้าของบัญชี
|
||||||
payment.account.fullName=ชื่อเต็ม (ชื่อจริง, ชื่อกลาง, นามสกุล)
|
payment.account.fullName=ชื่อเต็ม (ชื่อจริง, ชื่อกลาง, นามสกุล)
|
||||||
|
@ -1902,7 +1902,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=ชื่อผู้ใช้ หรือ อีเมล หรือ หมายเลขโทรศัพท์
|
payment.uphold.accountId=ชื่อผู้ใช้ หรือ อีเมล หรือ หมายเลขโทรศัพท์
|
||||||
payment.moneyBeam.accountId=อีเมลหรือหมายเลขโทรศัพท์
|
payment.moneyBeam.accountId=อีเมลหรือหมายเลขโทรศัพท์
|
||||||
payment.venmo.venmoUserName=ชื่อผู้ใช้ Venmo
|
|
||||||
payment.popmoney.accountId=อีเมลหรือหมายเลขโทรศัพท์
|
payment.popmoney.accountId=อีเมลหรือหมายเลขโทรศัพท์
|
||||||
payment.promptPay.promptPayId=รหัสบัตรประชาชน/รหัสประจำตัวผู้เสียภาษี หรือเบอร์โทรศัพท์
|
payment.promptPay.promptPayId=รหัสบัตรประชาชน/รหัสประจำตัวผู้เสียภาษี หรือเบอร์โทรศัพท์
|
||||||
payment.supportedCurrencies=สกุลเงินที่ได้รับการสนับสนุน
|
payment.supportedCurrencies=สกุลเงินที่ได้รับการสนับสนุน
|
||||||
|
@ -1957,8 +1956,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=โปรดยืนยันว่าธนาคารของคุณได้อนุมัติให้คุณสามารถส่งเงินสดให้กับบัญชีบุคคลอื่นได้ ตัวอย่างเช่น บางธนาคารที่ไม่ได้มีการบริการถ่ายโอนเงินสดอย่าง Bank of America และ Wells Fargo
|
payment.cashDeposit.info=โปรดยืนยันว่าธนาคารของคุณได้อนุมัติให้คุณสามารถส่งเงินสดให้กับบัญชีบุคคลอื่นได้ ตัวอย่างเช่น บางธนาคารที่ไม่ได้มีการบริการถ่ายโอนเงินสดอย่าง Bank of America และ Wells Fargo
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1872,7 +1872,7 @@ seed.restore.openOffers.warn=You have open offers which will be removed if you r
|
||||||
payment.account=Tài khoản
|
payment.account=Tài khoản
|
||||||
payment.account.no=Tài khoản số
|
payment.account.no=Tài khoản số
|
||||||
payment.account.name=Tên tài khoản
|
payment.account.name=Tên tài khoản
|
||||||
payment.account.userName=User name
|
payment.account.username=Username
|
||||||
payment.account.phoneNr=Phone number
|
payment.account.phoneNr=Phone number
|
||||||
payment.account.owner=Họ tên chủ tài khoản
|
payment.account.owner=Họ tên chủ tài khoản
|
||||||
payment.account.fullName=Họ tên (họ, tên lót, tên)
|
payment.account.fullName=Họ tên (họ, tên lót, tên)
|
||||||
|
@ -1904,7 +1904,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=Tên người dùng hoặc email hoặc số điện thoại
|
payment.uphold.accountId=Tên người dùng hoặc email hoặc số điện thoại
|
||||||
payment.moneyBeam.accountId=Email hoặc số điện thoại
|
payment.moneyBeam.accountId=Email hoặc số điện thoại
|
||||||
payment.venmo.venmoUserName=Tên người dùng Venmo
|
|
||||||
payment.popmoney.accountId=Email hoặc số điện thoại
|
payment.popmoney.accountId=Email hoặc số điện thoại
|
||||||
payment.promptPay.promptPayId=ID công dân/ ID thuế hoặc số điện thoại
|
payment.promptPay.promptPayId=ID công dân/ ID thuế hoặc số điện thoại
|
||||||
payment.supportedCurrencies=Tiền tệ hỗ trợ
|
payment.supportedCurrencies=Tiền tệ hỗ trợ
|
||||||
|
@ -1959,8 +1958,8 @@ payment.limits.info.withSigning=To limit chargeback risk, Haveno sets per-trade
|
||||||
|
|
||||||
payment.cashDeposit.info=Vui lòng xác nhận rằng ngân hàng của bạn cho phép nạp tiền mặt vào tài khoản của người khác. Chẳng hạn, Ngân Hàng Mỹ và Wells Fargo không còn cho phép nạp tiền như vậy nữa.
|
payment.cashDeposit.info=Vui lòng xác nhận rằng ngân hàng của bạn cho phép nạp tiền mặt vào tài khoản của người khác. Chẳng hạn, Ngân Hàng Mỹ và Wells Fargo không còn cho phép nạp tiền như vậy nữa.
|
||||||
|
|
||||||
payment.revolut.info=Revolut requires the 'User name' as account ID not the phone number or email as it was the case in the past.
|
payment.revolut.info=Revolut requires the 'Username' as account ID not the phone number or email as it was the case in the past.
|
||||||
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''User name''.\nPlease enter your Revolut ''User name'' to update your account data.\nThis will not affect your account age signing status.
|
payment.account.revolut.addUserNameInfo={0}\nYour existing Revolut account ({1}) does not have a ''Username''.\nPlease enter your Revolut ''Username'' to update your account data.\nThis will not affect your account age signing status.
|
||||||
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
payment.revolut.addUserNameInfo.headLine=Update Revolut account
|
||||||
|
|
||||||
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
payment.amazonGiftCard.upgrade=Amazon gift cards payment method requires the country to be specified.
|
||||||
|
|
|
@ -1879,7 +1879,7 @@ seed.restore.openOffers.warn=您有公开报价,如果您从种子词恢复,
|
||||||
payment.account=账户
|
payment.account=账户
|
||||||
payment.account.no=账户编号
|
payment.account.no=账户编号
|
||||||
payment.account.name=账户名称
|
payment.account.name=账户名称
|
||||||
payment.account.userName=用户昵称
|
payment.account.username=用户昵称
|
||||||
payment.account.phoneNr=电话号码
|
payment.account.phoneNr=电话号码
|
||||||
payment.account.owner=账户拥有者姓名:
|
payment.account.owner=账户拥有者姓名:
|
||||||
payment.account.fullName=全称(名,中间名,姓)
|
payment.account.fullName=全称(名,中间名,姓)
|
||||||
|
@ -1911,7 +1911,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=用户名或电子邮箱或电话号码
|
payment.uphold.accountId=用户名或电子邮箱或电话号码
|
||||||
payment.moneyBeam.accountId=电子邮箱或者电话号码
|
payment.moneyBeam.accountId=电子邮箱或者电话号码
|
||||||
payment.venmo.venmoUserName=Venmo 用户名:
|
|
||||||
payment.popmoney.accountId=电子邮箱或者电话号码
|
payment.popmoney.accountId=电子邮箱或者电话号码
|
||||||
payment.promptPay.promptPayId=公民身份证/税号或电话号码
|
payment.promptPay.promptPayId=公民身份证/税号或电话号码
|
||||||
payment.supportedCurrencies=支持的货币
|
payment.supportedCurrencies=支持的货币
|
||||||
|
|
|
@ -1873,7 +1873,7 @@ seed.restore.openOffers.warn=您有公開報價,如果您從種子詞恢復,
|
||||||
payment.account=賬户
|
payment.account=賬户
|
||||||
payment.account.no=賬户編號
|
payment.account.no=賬户編號
|
||||||
payment.account.name=賬户名稱
|
payment.account.name=賬户名稱
|
||||||
payment.account.userName=用户暱稱
|
payment.account.username=用户暱稱
|
||||||
payment.account.phoneNr=電話號碼
|
payment.account.phoneNr=電話號碼
|
||||||
payment.account.owner=賬户擁有者姓名:
|
payment.account.owner=賬户擁有者姓名:
|
||||||
payment.account.fullName=全稱(名,中間名,姓)
|
payment.account.fullName=全稱(名,中間名,姓)
|
||||||
|
@ -1905,7 +1905,6 @@ payment.amazon.site=Buy giftcard at
|
||||||
payment.ask=Ask in Trader Chat
|
payment.ask=Ask in Trader Chat
|
||||||
payment.uphold.accountId=用户名或電子郵箱或電話號碼
|
payment.uphold.accountId=用户名或電子郵箱或電話號碼
|
||||||
payment.moneyBeam.accountId=電子郵箱或者電話號碼
|
payment.moneyBeam.accountId=電子郵箱或者電話號碼
|
||||||
payment.venmo.venmoUserName=Venmo 用户名:
|
|
||||||
payment.popmoney.accountId=電子郵箱或者電話號碼
|
payment.popmoney.accountId=電子郵箱或者電話號碼
|
||||||
payment.promptPay.promptPayId=公民身份證/税號或電話號碼
|
payment.promptPay.promptPayId=公民身份證/税號或電話號碼
|
||||||
payment.supportedCurrencies=支持的貨幣
|
payment.supportedCurrencies=支持的貨幣
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.desktop.components.paymentmethods;
|
||||||
|
|
||||||
|
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||||
|
import haveno.core.locale.Res;
|
||||||
|
import haveno.core.payment.CashAppAccount;
|
||||||
|
import haveno.core.payment.PaymentAccount;
|
||||||
|
import haveno.core.payment.payload.CashAppAccountPayload;
|
||||||
|
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
|
import haveno.core.payment.validation.EmailOrMobileNrOrCashtagValidator;
|
||||||
|
import haveno.core.util.coin.CoinFormatter;
|
||||||
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
import haveno.desktop.components.InputTextField;
|
||||||
|
import haveno.desktop.util.FormBuilder;
|
||||||
|
import haveno.desktop.util.Layout;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.FlowPane;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addTopLabelFlowPane;
|
||||||
|
|
||||||
|
public class CashAppForm extends PaymentMethodForm {
|
||||||
|
private final CashAppAccount cashAppAccount;
|
||||||
|
private final EmailOrMobileNrOrCashtagValidator cashAppValidator;
|
||||||
|
|
||||||
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.cashtag"),
|
||||||
|
((CashAppAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrCashtag());
|
||||||
|
return gridRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CashAppForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
|
EmailOrMobileNrOrCashtagValidator cashAppValidator, InputValidator inputValidator, GridPane gridPane,
|
||||||
|
int gridRow,
|
||||||
|
CoinFormatter formatter) {
|
||||||
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
|
this.cashAppAccount = (CashAppAccount) paymentAccount;
|
||||||
|
this.cashAppValidator = cashAppValidator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForAddAccount() {
|
||||||
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
|
InputTextField mobileNrInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.email.mobile.cashtag"));
|
||||||
|
mobileNrInputTextField.setValidator(cashAppValidator);
|
||||||
|
mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
|
cashAppAccount.setEmailOrMobileNrOrCashtag(newValue.trim());
|
||||||
|
updateFromInputs();
|
||||||
|
});
|
||||||
|
addCurrenciesGrid(true);
|
||||||
|
addLimitations(false);
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addCurrenciesGrid(boolean isEditable) {
|
||||||
|
FlowPane flowPane = addTopLabelFlowPane(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.supportedCurrencies"), Layout.FLOATING_LABEL_DISTANCE * 3,
|
||||||
|
Layout.FLOATING_LABEL_DISTANCE * 3).second;
|
||||||
|
|
||||||
|
if (isEditable)
|
||||||
|
flowPane.setId("flow-pane-checkboxes-bg");
|
||||||
|
else
|
||||||
|
flowPane.setId("flow-pane-checkboxes-non-editable-bg");
|
||||||
|
|
||||||
|
cashAppAccount.getSupportedCurrencies().forEach(e ->
|
||||||
|
fillUpFlowPaneWithCurrencies(isEditable, flowPane, e, cashAppAccount));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void autoFillNameTextField() {
|
||||||
|
setAccountNameWithString(cashAppAccount.getEmailOrMobileNrOrCashtag());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForEditAccount() {
|
||||||
|
gridRowFrom = gridRow;
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.email.mobile.cashtag"),
|
||||||
|
cashAppAccount.getEmailOrMobileNrOrCashtag()).second;
|
||||||
|
field.setMouseTransparent(false);
|
||||||
|
addLimitations(true);
|
||||||
|
addCurrenciesGrid(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAllInputsValid() {
|
||||||
|
allInputsValid.set(isAccountNameValid()
|
||||||
|
&& cashAppValidator.validate(cashAppAccount.getEmailOrMobileNrOrCashtag()).isValid
|
||||||
|
&& cashAppAccount.getTradeCurrencies().size() > 0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.desktop.components.paymentmethods;
|
||||||
|
|
||||||
|
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||||
|
import haveno.core.locale.Res;
|
||||||
|
import haveno.core.payment.PayPalAccount;
|
||||||
|
import haveno.core.payment.PaymentAccount;
|
||||||
|
import haveno.core.payment.payload.PayPalAccountPayload;
|
||||||
|
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
|
import haveno.core.payment.validation.EmailOrMobileNrOrUsernameValidator;
|
||||||
|
import haveno.core.util.coin.CoinFormatter;
|
||||||
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
import haveno.desktop.components.InputTextField;
|
||||||
|
import haveno.desktop.util.FormBuilder;
|
||||||
|
import haveno.desktop.util.Layout;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.FlowPane;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addTopLabelFlowPane;
|
||||||
|
|
||||||
|
public class PayPalForm extends PaymentMethodForm {
|
||||||
|
private final PayPalAccount paypalAccount;
|
||||||
|
private final EmailOrMobileNrOrUsernameValidator paypalValidator;
|
||||||
|
|
||||||
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.username"),
|
||||||
|
((PayPalAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
||||||
|
return gridRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PayPalForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
|
EmailOrMobileNrOrUsernameValidator paypalValidator, InputValidator inputValidator, GridPane gridPane,
|
||||||
|
int gridRow,
|
||||||
|
CoinFormatter formatter) {
|
||||||
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
|
this.paypalAccount = (PayPalAccount) paymentAccount;
|
||||||
|
this.paypalValidator = paypalValidator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForAddAccount() {
|
||||||
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
|
InputTextField mobileNrInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.email.mobile.username"));
|
||||||
|
mobileNrInputTextField.setValidator(paypalValidator);
|
||||||
|
mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
|
paypalAccount.setEmailOrMobileNrOrUsername(newValue.trim());
|
||||||
|
updateFromInputs();
|
||||||
|
});
|
||||||
|
addCurrenciesGrid(true);
|
||||||
|
addLimitations(false);
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addCurrenciesGrid(boolean isEditable) {
|
||||||
|
FlowPane flowPane = addTopLabelFlowPane(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.supportedCurrencies"), Layout.FLOATING_LABEL_DISTANCE * 3,
|
||||||
|
Layout.FLOATING_LABEL_DISTANCE * 3).second;
|
||||||
|
|
||||||
|
if (isEditable)
|
||||||
|
flowPane.setId("flow-pane-checkboxes-bg");
|
||||||
|
else
|
||||||
|
flowPane.setId("flow-pane-checkboxes-non-editable-bg");
|
||||||
|
|
||||||
|
paypalAccount.getSupportedCurrencies().forEach(e ->
|
||||||
|
fillUpFlowPaneWithCurrencies(isEditable, flowPane, e, paypalAccount));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void autoFillNameTextField() {
|
||||||
|
setAccountNameWithString(paypalAccount.getEmailOrMobileNrOrUsername());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForEditAccount() {
|
||||||
|
gridRowFrom = gridRow;
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||||
|
Res.get(paypalAccount.getPaymentMethod().getId()));
|
||||||
|
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.email.mobile.username"),
|
||||||
|
paypalAccount.getEmailOrMobileNrOrUsername()).second;
|
||||||
|
field.setMouseTransparent(false);
|
||||||
|
addLimitations(true);
|
||||||
|
addCurrenciesGrid(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAllInputsValid() {
|
||||||
|
allInputsValid.set(isAccountNameValid()
|
||||||
|
&& paypalValidator.validate(paypalAccount.getEmailOrMobileNrOrUsername()).isValid
|
||||||
|
&& paypalAccount.getTradeCurrencies().size() > 0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -63,10 +63,10 @@ public class RevolutForm extends PaymentMethodForm {
|
||||||
public void addFormForAddAccount() {
|
public void addFormForAddAccount() {
|
||||||
gridRowFrom = gridRow + 1;
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
InputTextField userNameInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.userName"));
|
InputTextField userNameInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.username"));
|
||||||
userNameInputTextField.setValidator(validator);
|
userNameInputTextField.setValidator(validator);
|
||||||
userNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
userNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
account.setUserName(newValue.trim());
|
account.setUsername(newValue.trim());
|
||||||
updateFromInputs();
|
updateFromInputs();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class RevolutForm extends PaymentMethodForm {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void autoFillNameTextField() {
|
protected void autoFillNameTextField() {
|
||||||
setAccountNameWithString(account.getUserName());
|
setAccountNameWithString(account.getUsername());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -101,8 +101,8 @@ public class RevolutForm extends PaymentMethodForm {
|
||||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||||
Res.get(account.getPaymentMethod().getId()));
|
Res.get(account.getPaymentMethod().getId()));
|
||||||
|
|
||||||
String userName = account.getUserName();
|
String userName = account.getUsername();
|
||||||
TextField userNameTf = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.userName"), userName).second;
|
TextField userNameTf = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.username"), userName).second;
|
||||||
userNameTf.setMouseTransparent(false);
|
userNameTf.setMouseTransparent(false);
|
||||||
|
|
||||||
addLimitations(true);
|
addLimitations(true);
|
||||||
|
@ -112,7 +112,7 @@ public class RevolutForm extends PaymentMethodForm {
|
||||||
@Override
|
@Override
|
||||||
public void updateAllInputsValid() {
|
public void updateAllInputsValid() {
|
||||||
allInputsValid.set(isAccountNameValid()
|
allInputsValid.set(isAccountNameValid()
|
||||||
&& validator.validate(account.getUserName()).isValid
|
&& validator.validate(account.getUsername()).isValid
|
||||||
&& account.getTradeCurrencies().size() > 0);
|
&& account.getTradeCurrencies().size() > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class StrikeForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public static int addFormForBuyer(GridPane gridPane, int gridRow,
|
public static int addFormForBuyer(GridPane gridPane, int gridRow,
|
||||||
PaymentAccountPayload paymentAccountPayload) {
|
PaymentAccountPayload paymentAccountPayload) {
|
||||||
addTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.account.userName"),
|
addTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.account.username"),
|
||||||
((StrikeAccountPayload) paymentAccountPayload).getHolderName(), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE);
|
((StrikeAccountPayload) paymentAccountPayload).getHolderName(), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE);
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public class StrikeForm extends PaymentMethodForm {
|
||||||
|
|
||||||
gridRowFrom = gridRow + 1;
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
InputTextField holderNameField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.userName"));
|
InputTextField holderNameField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.username"));
|
||||||
holderNameField.setValidator(inputValidator);
|
holderNameField.setValidator(inputValidator);
|
||||||
holderNameField.textProperty().addListener((ov, oldValue, newValue) -> {
|
holderNameField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
account.setHolderName(newValue.trim());
|
account.setHolderName(newValue.trim());
|
||||||
|
@ -84,7 +84,7 @@ public class StrikeForm extends PaymentMethodForm {
|
||||||
addAccountNameTextFieldWithAutoFillToggleButton();
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||||
Res.get(account.getPaymentMethod().getId()));
|
Res.get(account.getPaymentMethod().getId()));
|
||||||
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.userName"),
|
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.username"),
|
||||||
account.getHolderName()).second;
|
account.getHolderName()).second;
|
||||||
field.setMouseTransparent(false);
|
field.setMouseTransparent(false);
|
||||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), account.getSingleTradeCurrency().getNameAndCode());
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), account.getSingleTradeCurrency().getNameAndCode());
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Haveno.
|
||||||
|
*
|
||||||
|
* Haveno is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package haveno.desktop.components.paymentmethods;
|
||||||
|
|
||||||
|
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||||
|
import haveno.core.locale.Res;
|
||||||
|
import haveno.core.locale.TradeCurrency;
|
||||||
|
import haveno.core.payment.VenmoAccount;
|
||||||
|
import haveno.core.payment.PaymentAccount;
|
||||||
|
import haveno.core.payment.payload.VenmoAccountPayload;
|
||||||
|
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||||
|
import haveno.core.payment.validation.EmailOrMobileNrOrUsernameValidator;
|
||||||
|
import haveno.core.util.coin.CoinFormatter;
|
||||||
|
import haveno.core.util.validation.InputValidator;
|
||||||
|
import haveno.desktop.components.InputTextField;
|
||||||
|
import haveno.desktop.util.FormBuilder;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
||||||
|
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
|
||||||
|
|
||||||
|
public class VenmoForm extends PaymentMethodForm {
|
||||||
|
private final VenmoAccount venmoAccount;
|
||||||
|
private final EmailOrMobileNrOrUsernameValidator venmoValidator;
|
||||||
|
|
||||||
|
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||||
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile.username"),
|
||||||
|
((VenmoAccountPayload) paymentAccountPayload).getEmailOrMobileNrOrUsername());
|
||||||
|
return gridRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VenmoForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
|
EmailOrMobileNrOrUsernameValidator venmoValidator, InputValidator inputValidator, GridPane gridPane,
|
||||||
|
int gridRow,
|
||||||
|
CoinFormatter formatter) {
|
||||||
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
|
this.venmoAccount = (VenmoAccount) paymentAccount;
|
||||||
|
this.venmoValidator = venmoValidator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForAddAccount() {
|
||||||
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
|
InputTextField mobileNrInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.email.mobile.username"));
|
||||||
|
mobileNrInputTextField.setValidator(venmoValidator);
|
||||||
|
mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
|
venmoAccount.setNameOrUsernameOrEmailOrMobileNr(newValue.trim());
|
||||||
|
updateFromInputs();
|
||||||
|
});
|
||||||
|
final TradeCurrency singleTradeCurrency = venmoAccount.getSingleTradeCurrency();
|
||||||
|
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
|
||||||
|
addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"),
|
||||||
|
nameAndCode);
|
||||||
|
addLimitations(false);
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void autoFillNameTextField() {
|
||||||
|
setAccountNameWithString(venmoAccount.getNameOrUsernameOrEmailOrMobileNr());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addFormForEditAccount() {
|
||||||
|
gridRowFrom = gridRow;
|
||||||
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||||
|
Res.get(venmoAccount.getPaymentMethod().getId()));
|
||||||
|
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow,
|
||||||
|
Res.get("payment.email.mobile.username"),
|
||||||
|
venmoAccount.getNameOrUsernameOrEmailOrMobileNr()).second;
|
||||||
|
field.setMouseTransparent(false);
|
||||||
|
final TradeCurrency singleTradeCurrency = venmoAccount.getSingleTradeCurrency();
|
||||||
|
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
|
||||||
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"),
|
||||||
|
nameAndCode);
|
||||||
|
addLimitations(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAllInputsValid() {
|
||||||
|
allInputsValid.set(isAccountNameValid()
|
||||||
|
&& venmoValidator.validate(venmoAccount.getNameOrUsernameOrEmailOrMobileNr()).isValid
|
||||||
|
&& venmoAccount.getTradeCurrencies().size() > 0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,7 +39,7 @@ public class VerseForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public static int addFormForBuyer(GridPane gridPane, int gridRow,
|
public static int addFormForBuyer(GridPane gridPane, int gridRow,
|
||||||
PaymentAccountPayload paymentAccountPayload) {
|
PaymentAccountPayload paymentAccountPayload) {
|
||||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.account.userName"),
|
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.account.username"),
|
||||||
((VerseAccountPayload) paymentAccountPayload).getHolderName());
|
((VerseAccountPayload) paymentAccountPayload).getHolderName());
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class VerseForm extends PaymentMethodForm {
|
||||||
public void addFormForAddAccount() {
|
public void addFormForAddAccount() {
|
||||||
gridRowFrom = gridRow + 1;
|
gridRowFrom = gridRow + 1;
|
||||||
|
|
||||||
InputTextField holderNameInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.userName"));
|
InputTextField holderNameInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.account.username"));
|
||||||
holderNameInputTextField.setValidator(inputValidator);
|
holderNameInputTextField.setValidator(inputValidator);
|
||||||
holderNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
holderNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||||
account.setHolderName(newValue.trim());
|
account.setHolderName(newValue.trim());
|
||||||
|
@ -92,7 +92,7 @@ public class VerseForm extends PaymentMethodForm {
|
||||||
addAccountNameTextFieldWithAutoFillToggleButton();
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||||
Res.get(account.getPaymentMethod().getId()));
|
Res.get(account.getPaymentMethod().getId()));
|
||||||
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.userName"),
|
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.username"),
|
||||||
account.getHolderName()).second;
|
account.getHolderName()).second;
|
||||||
field.setMouseTransparent(false);
|
field.setMouseTransparent(false);
|
||||||
addLimitations(true);
|
addLimitations(true);
|
||||||
|
|
|
@ -28,16 +28,19 @@ import haveno.core.locale.Res;
|
||||||
import haveno.core.offer.OfferRestrictions;
|
import haveno.core.offer.OfferRestrictions;
|
||||||
import haveno.core.payment.AmazonGiftCardAccount;
|
import haveno.core.payment.AmazonGiftCardAccount;
|
||||||
import haveno.core.payment.AustraliaPayidAccount;
|
import haveno.core.payment.AustraliaPayidAccount;
|
||||||
|
import haveno.core.payment.CashAppAccount;
|
||||||
import haveno.core.payment.CashAtAtmAccount;
|
import haveno.core.payment.CashAtAtmAccount;
|
||||||
import haveno.core.payment.CashDepositAccount;
|
import haveno.core.payment.CashDepositAccount;
|
||||||
import haveno.core.payment.F2FAccount;
|
import haveno.core.payment.F2FAccount;
|
||||||
import haveno.core.payment.HalCashAccount;
|
import haveno.core.payment.HalCashAccount;
|
||||||
import haveno.core.payment.MoneyGramAccount;
|
import haveno.core.payment.MoneyGramAccount;
|
||||||
import haveno.core.payment.PayByMailAccount;
|
import haveno.core.payment.PayByMailAccount;
|
||||||
|
import haveno.core.payment.PayPalAccount;
|
||||||
import haveno.core.payment.PaymentAccount;
|
import haveno.core.payment.PaymentAccount;
|
||||||
import haveno.core.payment.PaymentAccountFactory;
|
import haveno.core.payment.PaymentAccountFactory;
|
||||||
import haveno.core.payment.RevolutAccount;
|
import haveno.core.payment.RevolutAccount;
|
||||||
import haveno.core.payment.USPostalMoneyOrderAccount;
|
import haveno.core.payment.USPostalMoneyOrderAccount;
|
||||||
|
import haveno.core.payment.VenmoAccount;
|
||||||
import haveno.core.payment.WesternUnionAccount;
|
import haveno.core.payment.WesternUnionAccount;
|
||||||
import haveno.core.payment.ZelleAccount;
|
import haveno.core.payment.ZelleAccount;
|
||||||
import haveno.core.payment.payload.PaymentMethod;
|
import haveno.core.payment.payload.PaymentMethod;
|
||||||
|
@ -48,6 +51,8 @@ import haveno.core.payment.validation.BICValidator;
|
||||||
import haveno.core.payment.validation.CapitualValidator;
|
import haveno.core.payment.validation.CapitualValidator;
|
||||||
import haveno.core.payment.validation.ChaseQuickPayValidator;
|
import haveno.core.payment.validation.ChaseQuickPayValidator;
|
||||||
import haveno.core.payment.validation.EmailOrMobileNrValidator;
|
import haveno.core.payment.validation.EmailOrMobileNrValidator;
|
||||||
|
import haveno.core.payment.validation.EmailOrMobileNrOrCashtagValidator;
|
||||||
|
import haveno.core.payment.validation.EmailOrMobileNrOrUsernameValidator;
|
||||||
import haveno.core.payment.validation.F2FValidator;
|
import haveno.core.payment.validation.F2FValidator;
|
||||||
import haveno.core.payment.validation.HalCashValidator;
|
import haveno.core.payment.validation.HalCashValidator;
|
||||||
import haveno.core.payment.validation.InteracETransferValidator;
|
import haveno.core.payment.validation.InteracETransferValidator;
|
||||||
|
@ -75,6 +80,7 @@ import haveno.desktop.components.paymentmethods.AmazonGiftCardForm;
|
||||||
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
|
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
|
||||||
import haveno.desktop.components.paymentmethods.BizumForm;
|
import haveno.desktop.components.paymentmethods.BizumForm;
|
||||||
import haveno.desktop.components.paymentmethods.CapitualForm;
|
import haveno.desktop.components.paymentmethods.CapitualForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.CashAppForm;
|
||||||
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
|
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
|
||||||
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
||||||
import haveno.desktop.components.paymentmethods.CelPayForm;
|
import haveno.desktop.components.paymentmethods.CelPayForm;
|
||||||
|
@ -94,6 +100,7 @@ import haveno.desktop.components.paymentmethods.NeftForm;
|
||||||
import haveno.desktop.components.paymentmethods.NequiForm;
|
import haveno.desktop.components.paymentmethods.NequiForm;
|
||||||
import haveno.desktop.components.paymentmethods.PaxumForm;
|
import haveno.desktop.components.paymentmethods.PaxumForm;
|
||||||
import haveno.desktop.components.paymentmethods.PayByMailForm;
|
import haveno.desktop.components.paymentmethods.PayByMailForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.PayPalForm;
|
||||||
import haveno.desktop.components.paymentmethods.PaymentMethodForm;
|
import haveno.desktop.components.paymentmethods.PaymentMethodForm;
|
||||||
import haveno.desktop.components.paymentmethods.PayseraForm;
|
import haveno.desktop.components.paymentmethods.PayseraForm;
|
||||||
import haveno.desktop.components.paymentmethods.PaytmForm;
|
import haveno.desktop.components.paymentmethods.PaytmForm;
|
||||||
|
@ -117,6 +124,7 @@ import haveno.desktop.components.paymentmethods.TransferwiseUsdForm;
|
||||||
import haveno.desktop.components.paymentmethods.USPostalMoneyOrderForm;
|
import haveno.desktop.components.paymentmethods.USPostalMoneyOrderForm;
|
||||||
import haveno.desktop.components.paymentmethods.UpholdForm;
|
import haveno.desktop.components.paymentmethods.UpholdForm;
|
||||||
import haveno.desktop.components.paymentmethods.UpiForm;
|
import haveno.desktop.components.paymentmethods.UpiForm;
|
||||||
|
import haveno.desktop.components.paymentmethods.VenmoForm;
|
||||||
import haveno.desktop.components.paymentmethods.VerseForm;
|
import haveno.desktop.components.paymentmethods.VerseForm;
|
||||||
import haveno.desktop.components.paymentmethods.WeChatPayForm;
|
import haveno.desktop.components.paymentmethods.WeChatPayForm;
|
||||||
import haveno.desktop.components.paymentmethods.WesternUnionForm;
|
import haveno.desktop.components.paymentmethods.WesternUnionForm;
|
||||||
|
@ -158,6 +166,9 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
private final PerfectMoneyValidator perfectMoneyValidator;
|
private final PerfectMoneyValidator perfectMoneyValidator;
|
||||||
private final SwishValidator swishValidator;
|
private final SwishValidator swishValidator;
|
||||||
private final EmailOrMobileNrValidator zelleValidator;
|
private final EmailOrMobileNrValidator zelleValidator;
|
||||||
|
private final EmailOrMobileNrOrUsernameValidator paypalValidator;
|
||||||
|
private final EmailOrMobileNrOrUsernameValidator venmoValidator;
|
||||||
|
private final EmailOrMobileNrOrCashtagValidator cashAppValidator;
|
||||||
private final ChaseQuickPayValidator chaseQuickPayValidator;
|
private final ChaseQuickPayValidator chaseQuickPayValidator;
|
||||||
private final InteracETransferValidator interacETransferValidator;
|
private final InteracETransferValidator interacETransferValidator;
|
||||||
private final JapanBankTransferValidator japanBankTransferValidator;
|
private final JapanBankTransferValidator japanBankTransferValidator;
|
||||||
|
@ -189,6 +200,8 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
PerfectMoneyValidator perfectMoneyValidator,
|
PerfectMoneyValidator perfectMoneyValidator,
|
||||||
SwishValidator swishValidator,
|
SwishValidator swishValidator,
|
||||||
EmailOrMobileNrValidator zelleValidator,
|
EmailOrMobileNrValidator zelleValidator,
|
||||||
|
EmailOrMobileNrOrCashtagValidator cashAppValidator,
|
||||||
|
EmailOrMobileNrOrUsernameValidator emailMobileUsernameValidator,
|
||||||
ChaseQuickPayValidator chaseQuickPayValidator,
|
ChaseQuickPayValidator chaseQuickPayValidator,
|
||||||
InteracETransferValidator interacETransferValidator,
|
InteracETransferValidator interacETransferValidator,
|
||||||
JapanBankTransferValidator japanBankTransferValidator,
|
JapanBankTransferValidator japanBankTransferValidator,
|
||||||
|
@ -217,6 +230,9 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
this.perfectMoneyValidator = perfectMoneyValidator;
|
this.perfectMoneyValidator = perfectMoneyValidator;
|
||||||
this.swishValidator = swishValidator;
|
this.swishValidator = swishValidator;
|
||||||
this.zelleValidator = zelleValidator;
|
this.zelleValidator = zelleValidator;
|
||||||
|
this.paypalValidator = emailMobileUsernameValidator;
|
||||||
|
this.venmoValidator = emailMobileUsernameValidator;
|
||||||
|
this.cashAppValidator = cashAppValidator;
|
||||||
this.chaseQuickPayValidator = chaseQuickPayValidator;
|
this.chaseQuickPayValidator = chaseQuickPayValidator;
|
||||||
this.interacETransferValidator = interacETransferValidator;
|
this.interacETransferValidator = interacETransferValidator;
|
||||||
this.japanBankTransferValidator = japanBankTransferValidator;
|
this.japanBankTransferValidator = japanBankTransferValidator;
|
||||||
|
@ -362,6 +378,27 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
.actionButtonText(Res.get("shared.iUnderstand"))
|
.actionButtonText(Res.get("shared.iUnderstand"))
|
||||||
.onAction(() -> doSaveNewAccount(paymentAccount))
|
.onAction(() -> doSaveNewAccount(paymentAccount))
|
||||||
.show();
|
.show();
|
||||||
|
} else if (paymentAccount instanceof CashAppAccount) {
|
||||||
|
new Popup().warning(Res.get("payment.cashapp.info"))
|
||||||
|
.width(700)
|
||||||
|
.closeButtonText(Res.get("shared.cancel"))
|
||||||
|
.actionButtonText(Res.get("shared.iUnderstand"))
|
||||||
|
.onAction(() -> doSaveNewAccount(paymentAccount))
|
||||||
|
.show();
|
||||||
|
} else if (paymentAccount instanceof VenmoAccount) {
|
||||||
|
new Popup().warning(Res.get("payment.venmo.info"))
|
||||||
|
.width(700)
|
||||||
|
.closeButtonText(Res.get("shared.cancel"))
|
||||||
|
.actionButtonText(Res.get("shared.iUnderstand"))
|
||||||
|
.onAction(() -> doSaveNewAccount(paymentAccount))
|
||||||
|
.show();
|
||||||
|
} else if (paymentAccount instanceof PayPalAccount) {
|
||||||
|
new Popup().warning(Res.get("payment.paypal.info"))
|
||||||
|
.width(700)
|
||||||
|
.closeButtonText(Res.get("shared.cancel"))
|
||||||
|
.actionButtonText(Res.get("shared.iUnderstand"))
|
||||||
|
.onAction(() -> doSaveNewAccount(paymentAccount))
|
||||||
|
.show();
|
||||||
} else {
|
} else {
|
||||||
doSaveNewAccount(paymentAccount);
|
doSaveNewAccount(paymentAccount);
|
||||||
}
|
}
|
||||||
|
@ -624,6 +661,12 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
return new AchTransferForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
|
return new AchTransferForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
|
||||||
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
case PaymentMethod.DOMESTIC_WIRE_TRANSFER_ID:
|
||||||
return new DomesticWireTransferForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
|
return new DomesticWireTransferForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
|
||||||
|
case PaymentMethod.PAYPAL_ID:
|
||||||
|
return new PayPalForm(paymentAccount, accountAgeWitnessService, paypalValidator, inputValidator, root, gridRow, formatter);
|
||||||
|
case PaymentMethod.VENMO_ID:
|
||||||
|
return new VenmoForm(paymentAccount, accountAgeWitnessService, venmoValidator, inputValidator, root, gridRow, formatter);
|
||||||
|
case PaymentMethod.CASH_APP_ID:
|
||||||
|
return new CashAppForm(paymentAccount, accountAgeWitnessService, cashAppValidator, inputValidator, root, gridRow, formatter);
|
||||||
default:
|
default:
|
||||||
log.error("Not supported PaymentMethod: " + paymentMethod);
|
log.error("Not supported PaymentMethod: " + paymentMethod);
|
||||||
return null;
|
return null;
|
||||||
|
@ -669,4 +712,3 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class UpdateRevolutAccountWindow extends Overlay<UpdateRevolutAccountWind
|
||||||
|
|
||||||
private void addContent() {
|
private void addContent() {
|
||||||
addLabel(gridPane, ++rowIndex, Res.get("payment.account.revolut.addUserNameInfo", Res.get("payment.revolut.info"), revolutAccount.getAccountName()));
|
addLabel(gridPane, ++rowIndex, Res.get("payment.account.revolut.addUserNameInfo", Res.get("payment.revolut.info"), revolutAccount.getAccountName()));
|
||||||
userNameInputTextField = addInputTextField(gridPane, ++rowIndex, Res.get("payment.account.userName"), Layout.COMPACT_FIRST_ROW_DISTANCE);
|
userNameInputTextField = addInputTextField(gridPane, ++rowIndex, Res.get("payment.account.username"), Layout.COMPACT_FIRST_ROW_DISTANCE);
|
||||||
userNameInputTextField.setValidator(revolutValidator);
|
userNameInputTextField.setValidator(revolutValidator);
|
||||||
userNameInputTextField.textProperty().addListener((observable, oldValue, newValue) ->
|
userNameInputTextField.textProperty().addListener((observable, oldValue, newValue) ->
|
||||||
actionButton.setDisable(!revolutValidator.validate(newValue).isValid));
|
actionButton.setDisable(!revolutValidator.validate(newValue).isValid));
|
||||||
|
@ -81,7 +81,7 @@ public class UpdateRevolutAccountWindow extends Overlay<UpdateRevolutAccountWind
|
||||||
actionButton.setOnAction(event -> {
|
actionButton.setOnAction(event -> {
|
||||||
String userName = userNameInputTextField.getText();
|
String userName = userNameInputTextField.getText();
|
||||||
if (revolutValidator.validate(userName).isValid) {
|
if (revolutValidator.validate(userName).isValid) {
|
||||||
revolutAccount.setUserName(userName);
|
revolutAccount.setUsername(userName);
|
||||||
user.requestPersistence();
|
user.requestPersistence();
|
||||||
closeHandlerOptional.ifPresent(Runnable::run);
|
closeHandlerOptional.ifPresent(Runnable::run);
|
||||||
hide();
|
hide();
|
||||||
|
|
|
@ -856,9 +856,9 @@ message PaymentAccountPayload {
|
||||||
SwishAccountPayload swish_account_payload = 14;
|
SwishAccountPayload swish_account_payload = 14;
|
||||||
USPostalMoneyOrderAccountPayload u_s_postal_money_order_account_payload = 15;
|
USPostalMoneyOrderAccountPayload u_s_postal_money_order_account_payload = 15;
|
||||||
UpholdAccountPayload uphold_account_payload = 16;
|
UpholdAccountPayload uphold_account_payload = 16;
|
||||||
CashAppAccountPayload cash_app_account_payload = 17 [deprecated = true];
|
CashAppAccountPayload cash_app_account_payload = 17;
|
||||||
MoneyBeamAccountPayload money_beam_account_payload = 18;
|
MoneyBeamAccountPayload money_beam_account_payload = 18;
|
||||||
VenmoAccountPayload venmo_account_payload = 19 [deprecated = true];
|
VenmoAccountPayload venmo_account_payload = 19;
|
||||||
PopmoneyAccountPayload popmoney_account_payload = 20;
|
PopmoneyAccountPayload popmoney_account_payload = 20;
|
||||||
RevolutAccountPayload revolut_account_payload = 21;
|
RevolutAccountPayload revolut_account_payload = 21;
|
||||||
WeChatPayAccountPayload we_chat_pay_account_payload = 22;
|
WeChatPayAccountPayload we_chat_pay_account_payload = 22;
|
||||||
|
@ -880,6 +880,7 @@ message PaymentAccountPayload {
|
||||||
MoneseAccountPayload monese_account_payload = 38;
|
MoneseAccountPayload monese_account_payload = 38;
|
||||||
VerseAccountPayload verse_account_payload = 39;
|
VerseAccountPayload verse_account_payload = 39;
|
||||||
CashAtAtmAccountPayload cash_at_atm_account_payload = 40;
|
CashAtAtmAccountPayload cash_at_atm_account_payload = 40;
|
||||||
|
PayPalAccountPayload paypal_account_payload = 41;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1058,19 +1059,19 @@ message UpholdAccountPayload {
|
||||||
string account_owner = 2;
|
string account_owner = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated, not used anymore
|
|
||||||
message CashAppAccountPayload {
|
message CashAppAccountPayload {
|
||||||
string cash_tag = 1;
|
string email_or_mobile_nr_or_cashtag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MoneyBeamAccountPayload {
|
message MoneyBeamAccountPayload {
|
||||||
string account_id = 1;
|
string account_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated, not used anymore
|
|
||||||
message VenmoAccountPayload {
|
message VenmoAccountPayload {
|
||||||
string venmo_user_name = 1;
|
string email_or_mobile_nr_or_username = 1;
|
||||||
string holder_name = 2;
|
}
|
||||||
|
message PayPalAccountPayload {
|
||||||
|
string email_or_mobile_nr_or_username = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PopmoneyAccountPayload {
|
message PopmoneyAccountPayload {
|
||||||
|
@ -1079,7 +1080,7 @@ message PopmoneyAccountPayload {
|
||||||
}
|
}
|
||||||
|
|
||||||
message RevolutAccountPayload {
|
message RevolutAccountPayload {
|
||||||
string user_name = 1;
|
string username = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PerfectMoneyAccountPayload {
|
message PerfectMoneyAccountPayload {
|
||||||
|
@ -1332,8 +1333,8 @@ message XmrAddressEntry {
|
||||||
TRADE_PAYOUT = 5;
|
TRADE_PAYOUT = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 subaddress_index = 7;
|
int32 subaddress_index = 7;
|
||||||
string address_string = 8;
|
string address_string = 8;
|
||||||
string offer_id = 9;
|
string offer_id = 9;
|
||||||
Context context = 10;
|
Context context = 10;
|
||||||
int64 coin_locked_in_multi_sig = 11;
|
int64 coin_locked_in_multi_sig = 11;
|
||||||
|
@ -1544,7 +1545,7 @@ message SellerAsTakerTrade {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ArbitratorTrade {
|
message ArbitratorTrade {
|
||||||
Trade trade = 1;
|
Trade trade = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ProcessModel {
|
message ProcessModel {
|
||||||
|
@ -1872,6 +1873,9 @@ message PaymentAccountForm {
|
||||||
PAY_BY_MAIL = 13;
|
PAY_BY_MAIL = 13;
|
||||||
CASH_AT_ATM = 14;
|
CASH_AT_ATM = 14;
|
||||||
AUSTRALIA_PAYID = 15;
|
AUSTRALIA_PAYID = 15;
|
||||||
|
CASH_APP = 16;
|
||||||
|
PAYPAL = 17;
|
||||||
|
VENMO = 18;
|
||||||
}
|
}
|
||||||
FormId id = 1;
|
FormId id = 1;
|
||||||
repeated PaymentAccountFormField fields = 2;
|
repeated PaymentAccountFormField fields = 2;
|
||||||
|
@ -1936,7 +1940,9 @@ message PaymentAccountFormField {
|
||||||
SPECIAL_INSTRUCTIONS = 54;
|
SPECIAL_INSTRUCTIONS = 54;
|
||||||
STATE = 55;
|
STATE = 55;
|
||||||
TRADE_CURRENCIES = 56;
|
TRADE_CURRENCIES = 56;
|
||||||
USER_NAME = 57;
|
USERNAME = 57;
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_USERNAME = 58;
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_CASHTAG = 59;
|
||||||
}
|
}
|
||||||
enum Component {
|
enum Component {
|
||||||
TEXT = 0;
|
TEXT = 0;
|
||||||
|
|
Loading…
Reference in a new issue