private Result doFakeAuthorization(PaymentDTOEx payment, String transactionId) throws PluggableTaskException { CreditCardDTO creditCard = payment.getCreditCard(); if (creditCard == null || !myFilter.accept(creditCard)) { // give real processors a chance return new Result(null, true); } Integer resultId = getProcessResultId(creditCard); payment.setPaymentResult(new PaymentResultDAS().find(resultId)); PaymentAuthorizationDTO authInfo = createAuthorizationDTO(resultId, transactionId); storeProcessedAuthorization(payment, authInfo); boolean wasProcessed = (Constants.RESULT_FAIL.equals(resultId) || Constants.RESULT_OK.equals(resultId)); boolean shouldCallOthers = !wasProcessed && !myShouldBlockOtherProcessors; return new Result(authInfo, shouldCallOthers); }