// "Authorization and capture" request
TransactionResponse response;
try {
response = PayUPayments.doAuthorizationAndCapture(parameters);
// You can obtain the properties in the response
if (response != null) {
response.getOrderId();
response.getTransactionId();
response.getState();
if (response.getState().toString().equalsIgnoreCase("PENDING")) {
response.getPendingReason();
}
response.getPaymentNetworkResponseCode();
response.getPaymentNetworkResponseErrorMessage();
response.getTrazabilityCode();
response.getResponseCode();
response.getResponseMessage();
}
} catch (PayUException | InvalidParametersException | ConnectionException e) {
e.printStackTrace();
}