62,620
社区成员
发帖
与我相关
我的任务
分享
String msg = "";
int code = 0;
int count = 0;
float a = (float) 2;
PayEntity payEntity = new PaymentModelService().getPaymentModelPort()
.payment("123", "000029582", "2", a);
msg = payEntity.getErrorText();
code = payEntity.getErrorCode();
if (code == 1) {
// 当接口返回后,弹出是否继续支付窗体
// i = 0 代表是 i = 1 代表否 i = null代表取消
if (msg == null) {
return "error";
} else {
if (count > 3) { // 当接口返回后,弹出是否继续支付窗体
return "succ";
} else {
int ys = JOptionPane.showConfirmDialog(null, "是否继续支付",
"友情提示", JOptionPane.YES_NO_OPTION);
if (ys == 1) {
return "succ";
} else {
count = count+1;
System.out.println(count + "count");
return "input";
}
}
}
} else {
JOptionPane.showMessageDialog(null, msg);
return "input";
}
