Skip to content

Commit

Permalink
二维码支付支付金额设置与判断
Browse files Browse the repository at this point in the history
  • Loading branch information
egzosn committed Jan 30, 2019
1 parent 46a2715 commit e6aa309
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,24 @@ public Map<String, Object> orderInfo(PayOrder order) {
} else {
params.put(SDKConstants.param_payTimeout, DateUtils.formatDate(new Timestamp(System.currentTimeMillis() + 30 * 60 * 1000), DateUtils.YYYYMMDDHHMMSS));
}

params.put(SDKConstants.param_frontUrl, payConfigStorage.getReturnUrl());
break;
case CONSUME:
params.put(SDKConstants.param_txnAmt, Util.conversionCentAmount(order.getPrice()));
params.put(SDKConstants.param_qrNo, order.getAuthCode());
break;
case APPLY_QR_CODE:
if (null != order.getPrice()){
params.put(SDKConstants.param_txnAmt, Util.conversionCentAmount(order.getPrice()));
}

if (null != order.getExpirationTime()) {
params.put(SDKConstants.param_payTimeout, DateUtils.formatDate(order.getExpirationTime(), DateUtils.YYYYMMDDHHMMSS));
} else {
params.put(SDKConstants.param_payTimeout, DateUtils.formatDate(new Timestamp(System.currentTimeMillis() + 30 * 60 * 1000), DateUtils.YYYYMMDDHHMMSS));
}

break;
default:
}
Expand Down

0 comments on commit e6aa309

Please sign in to comment.