mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 13:13:36 +01:00
show payment details of australian payid and cash by atm
show terms and conditions prompt on cash by atm
This commit is contained in:
parent
89a9f074ea
commit
4993dc8a1f
@ -2948,7 +2948,7 @@ Country you are located (eg France); \n\
|
||||
Countries / regions you would accept trades from (eg France, EU, or any European country); \n\
|
||||
Any special terms/conditions; \n\
|
||||
Any other details.
|
||||
payment.payByMail.tradingRestrictions=Please review the maker's terms and conditions.\n\
|
||||
payment.tradingRestrictions=Please review the maker's terms and conditions.\n\
|
||||
If you do not meet the requirements do not take this trade.
|
||||
payment.cashByAtm.info=Cash at ATM: Cardless withdraw at ATM using code\n\n\
|
||||
1. List your accepted banks, regions, or other terms.\n\n\
|
||||
@ -2958,8 +2958,6 @@ payment.cashByAtm.extraInfo.prompt=Please state on your offers: \n\n\
|
||||
Your accepted banks / locations; \n\
|
||||
Any special terms/conditions; \n\
|
||||
Any other details.
|
||||
payment.payByMail.tradingRestrictions=Please review the maker's terms and conditions.\n\
|
||||
If you do not meet the requirements do not take this trade.
|
||||
payment.f2f.contact=Contact info
|
||||
payment.f2f.contact.prompt=How would you like to be contacted by the trading peer? (email address, phone number,...)
|
||||
payment.f2f.city=City for 'Face to face' meeting
|
||||
|
@ -28,7 +28,6 @@ import haveno.core.payment.payload.CashByAtmAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.util.coin.CoinFormatter;
|
||||
import haveno.core.util.validation.InputValidator;
|
||||
import haveno.desktop.util.Layout;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.layout.GridPane;
|
||||
@ -36,7 +35,6 @@ import javafx.scene.layout.GridPane;
|
||||
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextArea;
|
||||
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
|
||||
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
|
||||
import static haveno.desktop.util.FormBuilder.addTopLabelTextFieldWithCopyIcon;
|
||||
|
||||
public class CashByAtmForm extends PaymentMethodForm {
|
||||
private final CashByAtmAccount cashByAtmAccount;
|
||||
@ -44,10 +42,6 @@ public class CashByAtmForm extends PaymentMethodForm {
|
||||
public static int addFormForBuyer(GridPane gridPane, int gridRow,
|
||||
PaymentAccountPayload paymentAccountPayload) {
|
||||
CashByAtmAccountPayload cbm = (CashByAtmAccountPayload) paymentAccountPayload;
|
||||
addTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1,
|
||||
Res.get("payment.shared.extraInfo"),
|
||||
cbm.getExtraInfo(),
|
||||
Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
|
||||
TextArea textExtraInfo = addCompactTopLabelTextArea(gridPane, gridRow, 1, Res.get("payment.shared.extraInfo"), "").second;
|
||||
textExtraInfo.setMinHeight(70);
|
||||
|
@ -160,7 +160,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
private int gridRow = 0;
|
||||
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
|
||||
private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed,
|
||||
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed;
|
||||
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashByAtmWarningDisplayed;
|
||||
private SimpleBooleanProperty errorPopupDisplayed;
|
||||
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
|
||||
|
||||
@ -268,6 +268,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
maybeShowFasterPaymentsWarning(lastPaymentAccount);
|
||||
maybeShowAccountWarning(lastPaymentAccount, model.dataModel.isBuyOffer());
|
||||
maybeShowPayByMailWarning(lastPaymentAccount, model.dataModel.getOffer());
|
||||
maybeShowCashByAtmWarning(lastPaymentAccount, model.dataModel.getOffer());
|
||||
|
||||
if (!model.isRange()) {
|
||||
nextButton.setVisible(false);
|
||||
@ -1124,7 +1125,24 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
payByMailWarningDisplayed = true;
|
||||
UserThread.runAfter(() -> {
|
||||
new GenericMessageWindow()
|
||||
.preamble(Res.get("payment.payByMail.tradingRestrictions"))
|
||||
.preamble(Res.get("payment.tradingRestrictions"))
|
||||
.instruction(offer.getExtraInfo())
|
||||
.actionButtonText(Res.get("shared.iConfirm"))
|
||||
.closeButtonText(Res.get("shared.close"))
|
||||
.width(Layout.INITIAL_WINDOW_WIDTH)
|
||||
.onClose(() -> close(false))
|
||||
.show();
|
||||
}, 500, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
private void maybeShowCashByAtmWarning(PaymentAccount paymentAccount, Offer offer) {
|
||||
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_BY_ATM_ID) &&
|
||||
!cashByAtmWarningDisplayed && !offer.getExtraInfo().isEmpty()) {
|
||||
cashByAtmWarningDisplayed = true;
|
||||
UserThread.runAfter(() -> {
|
||||
new GenericMessageWindow()
|
||||
.preamble(Res.get("payment.tradingRestrictions"))
|
||||
.instruction(offer.getExtraInfo())
|
||||
.actionButtonText(Res.get("shared.iConfirm"))
|
||||
.closeButtonText(Res.get("shared.close"))
|
||||
|
@ -49,8 +49,10 @@ import haveno.desktop.components.paymentmethods.AdvancedCashForm;
|
||||
import haveno.desktop.components.paymentmethods.AliPayForm;
|
||||
import haveno.desktop.components.paymentmethods.AmazonGiftCardForm;
|
||||
import haveno.desktop.components.paymentmethods.AssetsForm;
|
||||
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
|
||||
import haveno.desktop.components.paymentmethods.BizumForm;
|
||||
import haveno.desktop.components.paymentmethods.CapitualForm;
|
||||
import haveno.desktop.components.paymentmethods.CashByAtmForm;
|
||||
import haveno.desktop.components.paymentmethods.PayByMailForm;
|
||||
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
||||
import haveno.desktop.components.paymentmethods.CelPayForm;
|
||||
@ -259,6 +261,9 @@ public class BuyerStep2View extends TradeStepView {
|
||||
case PaymentMethod.NATIONAL_BANK_ID:
|
||||
gridRow = NationalBankForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.AUSTRALIA_PAYID_ID:
|
||||
gridRow = AustraliaPayidForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.SAME_BANK_ID:
|
||||
gridRow = SameBankForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
@ -295,6 +300,9 @@ public class BuyerStep2View extends TradeStepView {
|
||||
case PaymentMethod.PAY_BY_MAIL_ID:
|
||||
gridRow = PayByMailForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.CASH_BY_ATM_ID:
|
||||
gridRow = CashByAtmForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.MONEY_GRAM_ID:
|
||||
gridRow = MoneyGramForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user