-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new payment method: Japan Bank Transfer (furikomi)
- Loading branch information
Showing
11 changed files
with
1,325 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
core/src/main/java/bisq/core/payment/JapanBankAccount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq 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. | ||
* | ||
* Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.core.payment; | ||
|
||
import bisq.core.payment.payload.JapanBankAccountPayload; | ||
import bisq.core.payment.payload.PaymentAccountPayload; | ||
import bisq.core.payment.payload.PaymentMethod; | ||
import bisq.core.payment.payload.JapanBankAccountPayload; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import bisq.core.locale.Country; | ||
import bisq.core.locale.FiatCurrency; | ||
import bisq.core.payment.payload.JapanBankAccountPayload; | ||
|
||
public final class JapanBankAccount extends PaymentAccount | ||
{ | ||
@Setter | ||
protected JapanBankAccountPayload paymentAccountPayload; | ||
|
||
public JapanBankAccount() | ||
{ | ||
super(PaymentMethod.JAPAN_BANK); | ||
setSingleTradeCurrency(new FiatCurrency("JPY")); | ||
} | ||
|
||
@Override | ||
protected PaymentAccountPayload createPayload() | ||
{ | ||
return new JapanBankAccountPayload(paymentMethod.getId(), id); | ||
} | ||
|
||
// bank name | ||
public String getBankName() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankName(); | ||
} | ||
public void setBankName(String bankName) | ||
{ | ||
if (bankName == null) return; | ||
System.out.println("got bank name: "+bankName); | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankName(bankName); | ||
} | ||
|
||
// bank number | ||
public String getBankCode() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankCode(); | ||
} | ||
public void setBankCode(String bankCode) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankCode(bankCode); | ||
} | ||
|
||
// branch name | ||
public String getBankBranchName() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankBranchName(); | ||
} | ||
public void setBankBranchName(String bankBranchName) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankBranchName(bankBranchName); | ||
} | ||
|
||
// branch number | ||
public String getBankBranchCode() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankBranchCode(); | ||
} | ||
public void setBankBranchCode(String bankBranchCode) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankBranchCode(bankBranchCode); | ||
} | ||
|
||
// account type | ||
public String getBankAccountType() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankAccountType(); | ||
} | ||
public void setBankAccountType(String bankAccountType) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankAccountType(bankAccountType); | ||
} | ||
|
||
// account number | ||
public String getBankAccountNumber() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankAccountNumber(); | ||
} | ||
public void setBankAccountNumber(String bankAccountNumber) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankAccountNumber(bankAccountNumber); | ||
} | ||
|
||
// account name | ||
public String getBankAccountName() | ||
{ | ||
return ((JapanBankAccountPayload) paymentAccountPayload).getBankAccountName(); | ||
} | ||
public void setBankAccountName(String bankAccountName) | ||
{ | ||
((JapanBankAccountPayload) paymentAccountPayload).setBankAccountName(bankAccountName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.