Commit 2e3386be by patpat

修复在线支付超时转离线支付时提示重复扫码的问题

parent a768d877
...@@ -71,13 +71,17 @@ public class PayOfflineAction extends Action { ...@@ -71,13 +71,17 @@ public class PayOfflineAction extends Action {
} }
public void exec(String payCode, String payCodeType) { public void exec(String payCode, String payCodeType) {
exec(payCode, payCodeType, true);
}
public void exec(String payCode, String payCodeType, boolean checkRepeat) {
setState(State.STARTED); setState(State.STARTED);
if (!QRCodeTask.TYPE_BHPAY.equals(payCodeType)) { if (!QRCodeTask.TYPE_BHPAY.equals(payCodeType)) {
setState(State.FAIL); setState(State.FAIL);
return; return;
} }
if (mPayCodeHistory.contains(payCode)) { if (checkRepeat && mPayCodeHistory.contains(payCode)) {
setState(State.FAIL, "请不要重复扫码"); setState(State.FAIL, "请不要重复扫码");
return; return;
} }
......
...@@ -99,7 +99,7 @@ public class PayOnlineAction extends Action { ...@@ -99,7 +99,7 @@ public class PayOnlineAction extends Action {
public void run(long id, boolean isLastTime) { public void run(long id, boolean isLastTime) {
if (isLastTime) { if (isLastTime) {
setState(State.TIMEOUT, "交易超时"); setState(State.TIMEOUT, "交易超时");
PayOfflineAction.getDefault().exec(payCode, payCodeType); PayOfflineAction.getDefault().exec(payCode, payCodeType, false);
} else { } else {
if (mActionRunnable != null) { if (mActionRunnable != null) {
mActionRunnable.run(); mActionRunnable.run();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment