{
String customerProfileId = userAttributeService.getAttribute(userId, ATTR_PROFILE_ID);
if (customerProfileId == null)
throw new OperationDisallowedException(userId + " has no Authorize.Net customer profile");
Order order = Order.createOrder();
order.setTotalAmount(amountToSettle);
PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();
paymentTransaction.setTransactionType(net.authorize.TransactionType.PRIOR_AUTH_CAPTURE);
paymentTransaction.setTransactionId(transactionId);
paymentTransaction.setOrder(order);