Use different wording in popups for cash deposit and postal money order

This commit is contained in:
Manfred Karrer 2016-08-29 13:36:53 +02:00
parent 0ff4e0051a
commit 3bb30b43c4
2 changed files with 61 additions and 22 deletions

View file

@ -29,10 +29,7 @@ import io.bitsquare.gui.main.portfolio.pendingtrades.steps.TradeStepView;
import io.bitsquare.gui.util.Layout;
import io.bitsquare.locale.BSResources;
import io.bitsquare.locale.CurrencyUtil;
import io.bitsquare.payment.CashDepositAccountContractData;
import io.bitsquare.payment.CryptoCurrencyAccountContractData;
import io.bitsquare.payment.PaymentAccountContractData;
import io.bitsquare.payment.PaymentMethod;
import io.bitsquare.payment.*;
import io.bitsquare.trade.Trade;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
@ -91,8 +88,21 @@ public class BuyerStep2View extends TradeStepView {
"DO NOT use any additional notice in the \"reason for payment\" text like " +
"Bitcoin, Btc or Bitsquare.\n\n" +
"If your bank charges fees you have to cover those fees.\n\n" +
"IMPORTANT REQUIREMENT:\n" +
"After you have done the payment write on the paper receipt: NO REFUNDS.\n" +
"Then tear it in 2 parts, make a photo and send it to the BTC seller's email address.";
else if (paymentAccountContractData instanceof USPostalMoneyOrderAccountContractData)
message = "Your trade has reached at least one blockchain confirmation.\n" +
"(You can wait for more confirmations if you want - 6 confirmations are considered as very secure.)\n\n" +
"Please send " +
model.formatter.formatVolumeWithCode(trade.getTradeVolume()) + " by \"US Postal Money Order\" to the BTC seller.\n\n" +
"Here are the payment account details of the BTC seller:\n" +
"" + paymentAccountContractData.getPaymentDetailsForTradePopup() + ".\n" +
"(You can copy & paste the values from the main screen after closing that popup.)\n\n" +
"Please don't forget to add the trade ID \"" + trade.getShortId() +
"\" as \"reason for payment\" so the receiver can assign your payment to this trade.\n\n" +
"DO NOT use any additional notice in the \"reason for payment\" text like " +
"Bitcoin, Btc or Bitsquare.";
else
message = "Your trade has reached at least one blockchain confirmation.\n" +
"(You can wait for more confirmations if you want - 6 confirmations are considered as very secure.)\n\n" +
@ -246,21 +256,25 @@ public class BuyerStep2View extends TradeStepView {
private void onPaymentStarted() {
if (model.p2PService.isBootstrapped()) {
String key = "confirmPaymentStarted";
if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
Popup popup = new Popup();
popup.headLine("Confirm that you have started the payment")
.confirmation("Did you initiate the " + CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()) +
" payment to your trading partner?")
.width(700)
.actionButtonText("Yes, I have started the payment")
.onAction(this::confirmPaymentStarted)
.closeButtonText("No")
.onClose(popup::hide)
.dontShowAgainId(key, preferences)
.show();
if (model.dataModel.getSellersPaymentAccountContractData() instanceof CashDepositAccountContractData) {
String key = "confirmPaperReceiptSent";
if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
Popup popup = new Popup();
popup.headLine("Did you sent the paper receipt to the BTC seller?")
.feedback("Remember:\n" +
"You need to write on the paper receipt: NO REFUNDS.\n" +
"Then tear it in 2 parts, make a photo and send it to the BTC seller's email address.")
.actionButtonText("Yes, I have sent the paper receipt")
.onAction(this::showConfirmPaymentStartedPopup)
.closeButtonText("No")
.onClose(popup::hide)
.dontShowAgainId(key, preferences)
.show();
} else {
showConfirmPaymentStartedPopup();
}
} else {
confirmPaymentStarted();
showConfirmPaymentStartedPopup();
}
} else {
new Popup().information("You need to wait until you are fully connected to the network.\n" +
@ -268,6 +282,25 @@ public class BuyerStep2View extends TradeStepView {
}
}
private void showConfirmPaymentStartedPopup() {
String key = "confirmPaymentStarted";
if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
Popup popup = new Popup();
popup.headLine("Confirm that you have started the payment")
.confirmation("Did you initiate the " + CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()) +
" payment to your trading partner?")
.width(700)
.actionButtonText("Yes, I have started the payment")
.onAction(this::confirmPaymentStarted)
.closeButtonText("No")
.onClose(popup::hide)
.dontShowAgainId(key, preferences)
.show();
} else {
confirmPaymentStarted();
}
}
private void confirmPaymentStarted() {
confirmButton.setDisable(true);
showStatusInfo();

View file

@ -80,10 +80,16 @@ public class SellerStep3View extends TradeStepView {
"You can copy & paste your " + currencyName + " address from the main screen after " +
"closing that popup.";
} else {
message = "Your trading partner has confirmed that he initiated the " + currencyName + " payment.\n\n" +
"Please go to your online banking web page and check if you have received " +
tradeVolumeWithCode + " from the BTC buyer.\n\n" +
"The trade ID (\"reason for payment\" text) of the transaction is: \"" + trade.getShortId() + "\"";
if (paymentAccountContractData instanceof USPostalMoneyOrderAccountContractData)
message = "Your trading partner has confirmed that he initiated the " + currencyName + " payment.\n\n" +
"Please check if you have received " +
tradeVolumeWithCode + " with \"US Postal Money Order\" from the BTC buyer.\n\n" +
"The trade ID (\"reason for payment\" text) of the transaction is: \"" + trade.getShortId() + "\"";
else
message = "Your trading partner has confirmed that he initiated the " + currencyName + " payment.\n\n" +
"Please go to your online banking web page and check if you have received " +
tradeVolumeWithCode + " from the BTC buyer.\n\n" +
"The trade ID (\"reason for payment\" text) of the transaction is: \"" + trade.getShortId() + "\"";
if (paymentAccountContractData instanceof CashDepositAccountContractData)
message += "\n\nBecause the payment is done via Cash Deposit the BTC buyer has to write \"NO REFUND\" " +