mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-23 14:24:14 -04:00
support alipay grpc api
This commit is contained in:
parent
80faa66fd6
commit
84c1a19376
4 changed files with 13 additions and 3 deletions
|
@ -79,7 +79,8 @@ public final class PaymentAccountForm implements PersistablePayload {
|
|||
PAYPAL,
|
||||
VENMO,
|
||||
PAYSAFE,
|
||||
WECHAT_PAY;
|
||||
WECHAT_PAY,
|
||||
ALI_PAY;
|
||||
|
||||
public static PaymentAccountForm.FormId fromProto(protobuf.PaymentAccountForm.FormId formId) {
|
||||
return ProtoUtil.enumFromProto(PaymentAccountForm.FormId.class, formId.name());
|
||||
|
|
|
@ -60,6 +60,13 @@ public final class AliPayAccount extends PaymentAccount {
|
|||
new TraditionalCurrency("ZAR")
|
||||
);
|
||||
|
||||
private static final List<PaymentAccountFormField.FieldId> INPUT_FIELD_IDS = List.of(
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NAME,
|
||||
PaymentAccountFormField.FieldId.ACCOUNT_NR,
|
||||
PaymentAccountFormField.FieldId.TRADE_CURRENCIES,
|
||||
PaymentAccountFormField.FieldId.SALT
|
||||
);
|
||||
|
||||
public AliPayAccount() {
|
||||
super(PaymentMethod.ALI_PAY);
|
||||
setSingleTradeCurrency(SUPPORTED_CURRENCIES.get(0));
|
||||
|
@ -77,7 +84,7 @@ public final class AliPayAccount extends PaymentAccount {
|
|||
|
||||
@Override
|
||||
public @NonNull List<PaymentAccountFormField.FieldId> getInputFieldIds() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
return INPUT_FIELD_IDS;
|
||||
}
|
||||
|
||||
public void setAccountNr(String accountNr) {
|
||||
|
|
|
@ -370,7 +370,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
|||
PAYPAL_ID,
|
||||
VENMO_ID,
|
||||
PAYSAFE_ID,
|
||||
WECHAT_PAY_ID);
|
||||
WECHAT_PAY_ID,
|
||||
ALI_PAY_ID);
|
||||
return paymentMethods.stream().filter(paymentMethod -> paymentMethodIds.contains(paymentMethod.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
|
|
@ -1904,6 +1904,7 @@ message PaymentAccountForm {
|
|||
VENMO = 18;
|
||||
PAYSAFE = 19;
|
||||
WECHAT_PAY = 20;
|
||||
ALI_PAY = 21;
|
||||
}
|
||||
FormId id = 1;
|
||||
repeated PaymentAccountFormField fields = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue