mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-31 10:49:19 -04:00
support wechat pay grpc api
This commit is contained in:
parent
9a5893b5d5
commit
80faa66fd6
4 changed files with 13 additions and 3 deletions
|
@ -78,7 +78,8 @@ public final class PaymentAccountForm implements PersistablePayload {
|
||||||
CASH_APP,
|
CASH_APP,
|
||||||
PAYPAL,
|
PAYPAL,
|
||||||
VENMO,
|
VENMO,
|
||||||
PAYSAFE;
|
PAYSAFE,
|
||||||
|
WECHAT_PAY;
|
||||||
|
|
||||||
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());
|
||||||
|
|
|
@ -38,6 +38,13 @@ public final class WeChatPayAccount extends PaymentAccount {
|
||||||
new TraditionalCurrency("GBP")
|
new TraditionalCurrency("GBP")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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 WeChatPayAccount() {
|
public WeChatPayAccount() {
|
||||||
super(PaymentMethod.WECHAT_PAY);
|
super(PaymentMethod.WECHAT_PAY);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +61,7 @@ public final class WeChatPayAccount 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 setAccountNr(String accountNr) {
|
public void setAccountNr(String accountNr) {
|
||||||
|
|
|
@ -369,7 +369,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
||||||
CASH_APP_ID,
|
CASH_APP_ID,
|
||||||
PAYPAL_ID,
|
PAYPAL_ID,
|
||||||
VENMO_ID,
|
VENMO_ID,
|
||||||
PAYSAFE_ID);
|
PAYSAFE_ID,
|
||||||
|
WECHAT_PAY_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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1903,6 +1903,7 @@ message PaymentAccountForm {
|
||||||
PAYPAL = 17;
|
PAYPAL = 17;
|
||||||
VENMO = 18;
|
VENMO = 18;
|
||||||
PAYSAFE = 19;
|
PAYSAFE = 19;
|
||||||
|
WECHAT_PAY = 20;
|
||||||
}
|
}
|
||||||
FormId id = 1;
|
FormId id = 1;
|
||||||
repeated PaymentAccountFormField fields = 2;
|
repeated PaymentAccountFormField fields = 2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue