Source:
<code>public CaptureResponse capture(CaptureGatewayRequest request) { String transactionId = request.getTransactionId(); String url = stripeGatewayConfig.getUrl() + "/v1/charges/" + transactionId + "/capture"; GatewayAccountEntity gatewayAccount = request.getGatewayAccount(); try { Response captureResponse = client.postRequest( URI.create(url), StringUtils.EMPTY, ImmutableMap.of(AUTHORIZATION, StripeAuthUtil.getAuthHeaderValue(stripeGatewayConfig)), APPLICATION_FORM_URLENCODED_TYPE, format("gateway-operations.%s.%s.capture", gatewayAccount.getGatewayName(), gatewayAccount.getType())); return fromBaseCaptureResponse(new StripeCaptureResponse((String) captureResponse.readEntity(Map.class).get("id")), COMPLETE); } catch (GatewayClientException e) { Response response = e.getResponse(); StripeErrorResponse stripeErrorResponse = response.readEntity(StripeErrorResponse.class); String errorCode = stripeErrorResponse.getError().getCode(); String errorMessage = stripeErrorResponse.getError().getMessage(); logger.error("Capture failed for transaction id {}. Failure code from Stripe: {}, failure message from Stripe: {}. External Charge id: {}. Response code from Stripe: {}", transactionId, errorCode, errorMessage, request.getExternalId(), response.getStatus()); <START> return fromBaseCaptureResponse(new StripeCaptureResponse(transactionId, errorCode, errorMessage), COMPLETE); <END> } catch (GatewayException e) { return CaptureResponse.fromGatewayError(GatewayError.of(e)); } catch (DownstreamException e) { String errorId = UUID.randomUUID().toString(); logger.error("Capture failed for transaction id {}. Reason: {}. Status code from Stripe: {}. ErrorId: {}", transactionId, e.getMessage(), e.getStatusCode(), errorId); GatewayError gatewayError = unexpectedStatusCodeFromGateway("An internal server error occurred. ErrorId: " + errorId); return CaptureResponse.fromGatewayError(gatewayError); } }</code><technical_language>this is of COMPLETE status</technical_language>

Target:
public CaptureResponse capture(CaptureGatewayRequest request) { String transactionId = request.getTransactionId(); String url = stripeGatewayConfig.getUrl() + "/v1/charges/" + transactionId + "/capture"; GatewayAccountEntity gatewayAccount = request.getGatewayAccount(); try { Response captureResponse = client.postRequest( URI.create(url), StringUtils.EMPTY, ImmutableMap.of(AUTHORIZATION, StripeAuthUtil.getAuthHeaderValue(stripeGatewayConfig)), APPLICATION_FORM_URLENCODED_TYPE, format("gateway-operations.%s.%s.capture", gatewayAccount.getGatewayName(), gatewayAccount.getType())); return fromBaseCaptureResponse(new StripeCaptureResponse((String) captureResponse.readEntity(Map.class).get("id")), COMPLETE); } catch (GatewayClientException e) { Response response = e.getResponse(); StripeErrorResponse stripeErrorResponse = response.readEntity(StripeErrorResponse.class); String errorCode = stripeErrorResponse.getError().getCode(); String errorMessage = stripeErrorResponse.getError().getMessage(); logger.error("Capture failed for transaction id {}. Failure code from Stripe: {}, failure message from Stripe: {}. External Charge id: {}. Response code from Stripe: {}", transactionId, errorCode, errorMessage, request.getExternalId(), response.getStatus()); return fromBaseCaptureResponse(new StripeCaptureResponse(transactionId, errorCode, errorMessage), null); } catch (GatewayException e) { return CaptureResponse.fromGatewayError(GatewayError.of(e)); } catch (DownstreamException e) { String errorId = UUID.randomUUID().toString(); logger.error("Capture failed for transaction id {}. Reason: {}. Status code from Stripe: {}. ErrorId: {}", transactionId, e.getMessage(), e.getStatusCode(), errorId); GatewayError gatewayError = unexpectedStatusCodeFromGateway("An internal server error occurred. ErrorId: " + errorId); return CaptureResponse.fromGatewayError(gatewayError); } }