@@ -58,7 +58,7 @@ public class IOSStoreKitV2Service {
|
||||
clientIp, null, null, deviceInfo, roomUid, null, null, null);
|
||||
}
|
||||
|
||||
public String verifyOrder(String uid, String chargeRecordId, String transcationId, String clientIp, DeviceInfo deviceInfo) {
|
||||
public String verifyOrder(String chargeRecordId, String transcationId, String clientIp, DeviceInfo deviceInfo) {
|
||||
boolean locked = false;
|
||||
String lockKey = RedisKey.lock_iospay_verify.getKey(transcationId);
|
||||
RLock lock = redissonClient.getLock(lockKey);
|
||||
@@ -67,7 +67,7 @@ public class IOSStoreKitV2Service {
|
||||
if (!locked){
|
||||
throw new ServiceException(BusiStatus.SERVERBUSY);
|
||||
}
|
||||
log.info("[verifyOrder] 参数 {} {} {} {} {}", uid, chargeRecordId, transcationId, clientIp, deviceInfo.getDeviceId());
|
||||
log.info("[verifyOrder] 参数 {} {} {} {} {}", chargeRecordId, transcationId, clientIp, deviceInfo.getDeviceId());
|
||||
|
||||
ChargeRecord chargeRecord = chargeRecordService.getChargeRecordById(chargeRecordId);
|
||||
if (null == chargeRecord
|
||||
@@ -76,7 +76,7 @@ public class IOSStoreKitV2Service {
|
||||
throw new ServiceException(BusiStatus.TRANSFER_COMPLETED);
|
||||
}
|
||||
|
||||
ChargeRecord pingxxChargeRecord = chargeRecordService.getChargeRecordByPingxxChargeId(chargeRecord.getPingxxChargeId());
|
||||
ChargeRecord pingxxChargeRecord = chargeRecordService.getChargeRecordByPingxxChargeId(transcationId);
|
||||
if (null != pingxxChargeRecord && !Constant.ChargeRecordStatus.create.equals(pingxxChargeRecord.getChargeStatus())){
|
||||
throw new ServiceException(BusiStatus.TRANSFER_COMPLETED);
|
||||
}
|
||||
|
@@ -38,14 +38,17 @@ public class IOSStorekitV2Controller extends BaseController {
|
||||
|
||||
@Authorization
|
||||
@RequestMapping("/verifyOrder")
|
||||
public BusiResult<String> verifyOrder(String uid, String chargeRecordId, String transcationId,
|
||||
public BusiResult<String> verifyOrder(String chargeRecordId, String transcationId,
|
||||
HttpServletRequest request) {
|
||||
String clientIp = IPUtils.getRealIpAddress(request);
|
||||
DeviceInfo deviceInfo = getDeviceInfo(request);
|
||||
if (!StringUtils.hasText(uid) || !StringUtils.hasText(deviceInfo.getDeviceId())) {
|
||||
if (!StringUtils.hasText(chargeRecordId) || !StringUtils.hasText(transcationId)) {
|
||||
return new BusiResult<>(BusiStatus.PARAMETERILLEGAL);
|
||||
}
|
||||
String tId = iosPayPlaService.verifyOrder(uid, chargeRecordId, transcationId, clientIp, deviceInfo);
|
||||
String clientIp = IPUtils.getRealIpAddress(request);
|
||||
DeviceInfo deviceInfo = getDeviceInfo(request);
|
||||
if (!StringUtils.hasText(deviceInfo.getDeviceId())) {
|
||||
return new BusiResult<>(BusiStatus.PARAMETERILLEGAL);
|
||||
}
|
||||
String tId = iosPayPlaService.verifyOrder(chargeRecordId, transcationId, clientIp, deviceInfo);
|
||||
return new BusiResult<>(tId);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user