修改返回提示語
This commit is contained in:
@@ -134,7 +134,11 @@ public class MyCardBizServiceImpl implements MyCardBizService {
|
||||
@Override
|
||||
public String callback(CallbackDto callback) {
|
||||
if (!callback.isSuccess()) {
|
||||
return StrUtil.EMPTY;
|
||||
try {
|
||||
return URLDecoder.decode(callback.getReturnMsg(), StandardCharsets.UTF_8.name());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
String preHashValue = callback.getReturnCode() + callback.getPayResult() + callback.getFacTradeSeq() + callback.getPaymentType() + callback.getAmount() + callback.getCurrency() + callback.getMyCardTradeNo() + callback.getMyCardType() + callback.getPromoCode() + myCardConfig.getSecretKey();
|
||||
String encodeHashValue = StrUtil.EMPTY;
|
||||
@@ -165,11 +169,11 @@ public class MyCardBizServiceImpl implements MyCardBizService {
|
||||
updateOrder(chargeRecordId, currency, amount, myCardTradeNo);
|
||||
ChargeRecord chargeRecord = chargeRecordMapper.selectByPrimaryKey(chargeRecordId);
|
||||
if (chargeRecord == null) {
|
||||
return StrUtil.EMPTY;
|
||||
return "交易失敗";
|
||||
}
|
||||
String metadata = chargeRecord.getMetadata();
|
||||
if (StrUtil.isEmpty(metadata)) {
|
||||
return StrUtil.EMPTY;
|
||||
return "交易失敗";
|
||||
}
|
||||
AuthGlobalResp authGlobalResp = JSONObject.parseObject(metadata, AuthGlobalResp.class);
|
||||
String successUrl = authGlobalResp.getSuccessUrl();
|
||||
|
@@ -94,7 +94,7 @@ public class MyCardController {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return new ModelAndView("error");
|
||||
return "交易失敗";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user