use of uk.gov.pay.connector.common.exception.ConflictRuntimeException in project pay-connector by alphagov.
the class CardCaptureService method doCapture.
public CaptureResponse doCapture(String externalId) {
ChargeEntity charge;
try {
charge = prepareChargeForCapture(externalId);
} catch (OptimisticLockException e) {
LOG.info("OptimisticLockException in doCapture for charge external_id={}", externalId);
throw new ConflictRuntimeException(externalId);
}
CaptureResponse operationResponse = capture(charge);
processGatewayCaptureResponse(externalId, charge.getStatus(), operationResponse);
return operationResponse;
}
Aggregations